<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsarenik</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsarenik"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Jsarenik"/>
	<updated>2026-04-05T19:59:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=70326</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=70326"/>
		<updated>2024-09-29T14:48:59Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Block explorers */ fix bublina explorer subdomain limit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Signet&#039;&#039;&#039; ([[BIP 0325]]) is a new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (VI) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki BIP-325]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signetfaucet.com/&lt;br /&gt;
* https://alt.signetfaucet.com (the same [https://signetfaucet.bublina.eu.org here])&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
* https://github.com/jsarenik/bitcoin-faucet-shell (POSIX shell)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
* https://mempool.space/signet&lt;br /&gt;
* https://exsignet.bublina.eu.org&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we&#039;re going to get an issuer up and running to mine blocks.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll need to provide a value for &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; which is the mining target and is inversely proportional to the difficulty. This will allow us to set the average time between mined blocks.&lt;br /&gt;
&lt;br /&gt;
We can use the &amp;lt;code&amp;gt;calibrate&amp;lt;/code&amp;gt; command to give us the &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; for an average mining time of 10 min (600 s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli&amp;quot; calibrate --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --seconds=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Referring to our &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; value with the variable &amp;lt;code&amp;gt;$NBITS&amp;lt;/code&amp;gt;, we need to specify &amp;lt;code&amp;gt;--set-block-time&amp;lt;/code&amp;gt; when mining the first block in a new signet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --set-block-time=$(date +%s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then mine the first block to that address. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
To keep the mining ongoing from there, aiming for blocks arriving every 10 minutes on average, we can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --ongoing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Real_Time_Bitcoin_Market_Data&amp;diff=69233</id>
		<title>Real Time Bitcoin Market Data</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Real_Time_Bitcoin_Market_Data&amp;diff=69233"/>
		<updated>2022-03-13T12:16:17Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* External Links */ Fix link to Clark Moody&amp;#039;s Tickers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Bitcoin Data Platform by Clark Moody==&lt;br /&gt;
A financial information service that provides a real-time display of data from the [[MtGox]] exchange.&lt;br /&gt;
&lt;br /&gt;
* Combined - Includes all of the services listed below&lt;br /&gt;
* Time Sales - Time price and volume for each trade executed&lt;br /&gt;
* Ticker - Current best ask / best bid, day&#039;s high, day&#039;s low, volume and last trade for all MtGox currencies. The site also displays a synthetic forex grid, based on the immediate exchange rates between non-zero volume currencies.&lt;br /&gt;
* Order Book - The buy (bid) and sell (ask) orders along with real time trade calculators&lt;br /&gt;
&lt;br /&gt;
The Ticker and Time Sales services were announced on June 03, 2011&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=11560.0 Realtime MtGox Time and Sales with WebSockets]&amp;lt;/ref&amp;gt; and the Order Book was announced on June 10, 2011&amp;lt;ref&amp;gt;[http://bitcointalk.org/index.php?topic=14412.0 Real Time Order Book with WebSockets]&amp;lt;/ref&amp;gt;. The combined information view was announced on September 11, 2011&amp;lt;ref&amp;gt;[https://bitcointalk.org/index.php?topic=43514.0 Combined Order Book and Time &amp;amp; Sales]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Bitcoin-Analytics.com==&lt;br /&gt;
Relatively new financial information analytical service which provides real-time display of data from multiple bitcoin exchanges. The service was announced on May 21, 2012&amp;lt;ref&amp;gt;[https://bitcointalk.org/index.php?topic=82768.0 Bitcoin-Analytics.com]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Supported Markets===&lt;br /&gt;
* USD - mtgoxUSD, btceUSD, cbxUSD, cryptoxUSD, intrsngUSD, bitstampUSD, bitmarketUSD, bcLRUSD, vcxUSD, btc24USD, &amp;lt;strike&amp;gt;bitfloorUSD&amp;lt;/strike&amp;gt; &lt;br /&gt;
* EUR - mtgoxEUR, bitmarketEUR, vcxEUR, intrsngEUR, bcEUR, bcLREUR, bitcurexEUR, btc24EUR&lt;br /&gt;
* CNY - btcnCNY, mtgoxCNY&lt;br /&gt;
 &lt;br /&gt;
===Displayed Charts===&lt;br /&gt;
* Order Book Volume Chart&lt;br /&gt;
* MKT Execution Price Chart&lt;br /&gt;
* Time Last 1000? BTC Traded Chart&lt;br /&gt;
* VWAP Last 1000? BTC Traded Chart&lt;br /&gt;
* Trade Volume Chart&lt;br /&gt;
&lt;br /&gt;
===Arbitrage Table===&lt;br /&gt;
Service provides arbitrage tables for all supported currency markets.&lt;br /&gt;
&lt;br /&gt;
===Consolidated Order Books===&lt;br /&gt;
Also service provides unique data - consolidated order books (all order books for the same currency are merged and all orders are sorted). Thus for each currency there is additional consolidated currency market: one for USD allUSD, for EUR allEUR, and for CNY allCNY.&lt;br /&gt;
&lt;br /&gt;
Consolidated order books data can help represent the behavior of the whole market.&lt;br /&gt;
For example consolidated order book charts clearly displays whether arbitrage opportunity is present among different exchanges and for how long it is present, and at what extent. Also comparing charts for different exchanges it is possible to see quickly between which exchanges this particular arbitrage apportunity currently exists.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://bitcoinchain.com/ BitcoinChain] Real Time MtGox market data and order book&lt;br /&gt;
* [http://bitcoin.clarkmoody.com/ Combined Order Book, Time &amp;amp; Sales, and Historical Chart] web page&lt;br /&gt;
* [http://bitcoin.clarkmoody.com/tickers Tickers] web page&lt;br /&gt;
* [http://bitcoin-analytics.com Bitcoin-Analytics.com - Multiple Exchanges Consolidated Order Books and Trades Real Time Charts] subscribtion service web page&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Financial]]&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Block_chain_browser&amp;diff=69232</id>
		<title>Block chain browser</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Block_chain_browser&amp;diff=69232"/>
		<updated>2022-03-13T12:03:22Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* List of blockchain explorers */ fix BitcoinExplorer link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Block Explorer==&lt;br /&gt;
&lt;br /&gt;
A Blockchain Explorer is a web application to view and query [https://en.bitcoin.it/wiki/Block blocks] &amp;lt;ref&amp;gt;Blockchain for dummies p 99 -  Tiana Laurence - ISBN 978-1119365594&amp;lt;/ref&amp;gt; working as a  [https://en.bitcoin.it/wiki/Web_browser web browser] that is not connected to the internet, like Google Chrome, but to the [https://en.bitcoin.it/wiki/Blockchain Blockchain]. Their primary function is to allow everyone with an internet connection to track in real-time all the [https://en.bitcoin.it/wiki/Transaction_confirmation transactions] or interactions made by each [https://en.bitcoin.it/wiki/Cryptocurrency cryptocurrencies] holders, regardless of his or her level of knowledge and expertise. &amp;lt;ref&amp;gt;Blockchain Enabled Application p.21 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. However, although there are plenty of Explorer available, only a tiny minority are able to show the transaction using [https://en.bitcoin.it/wiki/Segregated_Witness SegWit] (Bitcoin bech32 addresses start with “bc1”) &amp;lt;ref&amp;gt;Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition p.19- Joseph J. Bambara - ISBN 978-1260115871&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The default view==&lt;br /&gt;
&lt;br /&gt;
The default view in the main page generally provides in real time information about of all the last blocks that are being added to the blockchain, most often separated into six columns with this following informations:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Block height:&#039;&#039;&#039; &amp;lt;ref&amp;gt;Mastering Bitcoin p.28 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;  block number since the Bitcoin [https://en.bitcoin.it/wiki/Genesis_block genesis block] was [https://en.bitcoin.it/wiki/Mining mined]. Each new mined block assumes an increase of one at the height of the block. Thus, the number 492800 in this column means this is the 492800th block mined in the whole history.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Age:&#039;&#039;&#039; the moment when the block was accepted by a miner and not when the user initiated a payment or transfer to another wallet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[https://en.bitcoin.it/wiki/Transaction_confirmation Confirmation]:&#039;&#039;&#039; The most relevant information visible at a glance, the transaction status. If a transaction is «unconfirmed» or «pending», that means the transaction is in the Blockchain, but has not included in a block yet. In average, it takes typically 10 minutes for a bitcoin transaction to be confirmed. It will take about one hour to get «confirmed» by six confirmations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transaction list (TX):&#039;&#039;&#039; number of transactions included in the block. &amp;lt;ref&amp;gt;Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition p.18- Joseph J. Bambara - ISBN 978-1260115871&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reward:&#039;&#039;&#039; the reward for those (miners) who mined the block.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mined by:&#039;&#039;&#039; name of the miner who mined this block. Usually a pool of miners who had been involved in.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Size:&#039;&#039;&#039; size of the transaction obtained by adding the sizes of each transactions included in the block. This data is always provided in bytes.&lt;br /&gt;
&lt;br /&gt;
==The browser==&lt;br /&gt;
&lt;br /&gt;
In the same way as with an Internet browser, the user needs to enter a request to begin his search. It can be a transaction hash or TXID &amp;lt;ref&amp;gt;beginning-blockchain-guide-building-solutions p.278 - Bikramaditya Singhal - ISBN 978-1484234433&amp;lt;/ref&amp;gt;(sequence of 64 characters hexadecimal (0 to 9 and a to f) numbers used to uniquely identify a particular transaction) or a block height for example. Automatically, a page containing all the details about the transaction is loaded according to the request. Advanced information contains all the movements in this transaction and is only available at the user&#039;s request. Most of the time, a bitcoin transaction has several input and output [https://en.bitcoin.it/wiki/Bitcoin_address addresses] insofar as it allows a sender to save time and money by sending to several addresses at once. All the following data will be displayed:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TXID:&#039;&#039;&#039; as mentioned above&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Input:&#039;&#039;&#039;  transaction inputs are pointers to UTXO &amp;lt;ref&amp;gt;Blockchain Enabled Application p.18 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. They point to a specific UTXO by reference to the transaction hash and sequence number where the UTXO is recorded in the blockchain. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output:&#039;&#039;&#039; contains instructions for sending bitcoins &amp;lt;ref&amp;gt;Blockchain Enabled Application p.18 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Value:&#039;&#039;&#039; the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ScriptPubKey:&#039;&#039;&#039; the second half of a script. There can be more than one output. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if the user doesn&#039;t want to lose it. &amp;lt;ref&amp;gt;beginning-blockchain-guide-building-solutions p.201-202 - Bikramaditya Singhal - ISBN 978-1484234433&amp;lt;/ref&amp;gt; If the input is worth 50 BTC but a consumer only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC. This section is divided into two parts. The first, the top line, showing the total amount that the recipient has to receive in BTC, known as the destination. And the other part, below, showing the amount of bitcoins back to the user that remains in the wallet and which can be used as a new input in a subsequent transaction. Any input bitcoins not redeemed in an output is considered a transaction fee.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transaction Fees:&#039;&#039;&#039; most transactions include transaction fees, which compensate the bitcoin miners for securing the network. Transaction fees serve as an incentive to include (mine) a transaction into the next block and also as a disincentive against “spam” transactions or any kind of abuse of the system, by imposing a small cost on every transaction. Transaction fees are collected by the miner who mines the block that records the transaction on the blockchain. &amp;lt;ref&amp;gt;Mastering Bitcoin p.127 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coinbase Data:&#039;&#039;&#039; This field must be between 2 and 100 bytes. Except for the first few bytes the rest of the coinbase data can be used by miners in any way they want; it is arbitrary data. In the genesis block, for example, Satoshi Nakamoto added the text “The Times 03/Jan/ 2009 Chancellor on brink of second bailout for banks” in the coinbase data, using it as a proof of the date and to convey a message. Currently, miners use the coinbase data to include extra nonce values and strings identifying the mining pool. &amp;lt;ref&amp;gt;Mastering Bitcoin p.225 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==List of blockchain explorers==&lt;br /&gt;
* https://mempool.space    Open-source Bitcoin Explorer&lt;br /&gt;
* https://bitaps.com	Explorer that supports Segwit&lt;br /&gt;
* https://apirone.com/btc/	Explorer that supports Segwit&lt;br /&gt;
* https://blockstream.info/	&lt;br /&gt;
* https://bitupper.com/en/explorer/bitcoin	Explorer that supports Segwit&lt;br /&gt;
* http://btcblockexplorer.financialplugins.com	&lt;br /&gt;
* https://bitcoinchain.com	&lt;br /&gt;
* https://bitinfocharts.com/bitcoin&lt;br /&gt;
* https://blockchain.info	&lt;br /&gt;
* https://blockchair.com/	Explorer that supports Segwit, privacy centric&lt;br /&gt;
* https://blockexplorer.com/	&lt;br /&gt;
* https://btc.com/	Explorer that supports Segwit	&lt;br /&gt;
* https://chain.so/BTC	&lt;br /&gt;
* https://chainz.cryptoid.info/btc	Explorer that supports Segwit&lt;br /&gt;
* https://explorer.bitcoin.com/btc	&lt;br /&gt;
* https://insight.bitpay.com&lt;br /&gt;
* https://live.blockcypher.com/btc	&lt;br /&gt;
* https://multihash.net	&lt;br /&gt;
* https://btc.blockdozer.com	&lt;br /&gt;
* https://www.blockonomics.co	Explorer that supports Segwit&lt;br /&gt;
* https://www.blocktrail.com/BTC	&lt;br /&gt;
* https://www.smartbit.com.au&lt;br /&gt;
* https://explorer.poolin.com/ Explorer that supports Segwit&lt;br /&gt;
* https://ex.bublina.eu.org - local [https://bitcoinexplorer.org/ BitcoinExplorer] instance&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
	&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Block_chain_browser&amp;diff=69231</id>
		<title>Block chain browser</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Block_chain_browser&amp;diff=69231"/>
		<updated>2022-03-13T12:02:26Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* List of blockchain explorers */ Add ex.bublina.eu.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Block Explorer==&lt;br /&gt;
&lt;br /&gt;
A Blockchain Explorer is a web application to view and query [https://en.bitcoin.it/wiki/Block blocks] &amp;lt;ref&amp;gt;Blockchain for dummies p 99 -  Tiana Laurence - ISBN 978-1119365594&amp;lt;/ref&amp;gt; working as a  [https://en.bitcoin.it/wiki/Web_browser web browser] that is not connected to the internet, like Google Chrome, but to the [https://en.bitcoin.it/wiki/Blockchain Blockchain]. Their primary function is to allow everyone with an internet connection to track in real-time all the [https://en.bitcoin.it/wiki/Transaction_confirmation transactions] or interactions made by each [https://en.bitcoin.it/wiki/Cryptocurrency cryptocurrencies] holders, regardless of his or her level of knowledge and expertise. &amp;lt;ref&amp;gt;Blockchain Enabled Application p.21 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. However, although there are plenty of Explorer available, only a tiny minority are able to show the transaction using [https://en.bitcoin.it/wiki/Segregated_Witness SegWit] (Bitcoin bech32 addresses start with “bc1”) &amp;lt;ref&amp;gt;Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition p.19- Joseph J. Bambara - ISBN 978-1260115871&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The default view==&lt;br /&gt;
&lt;br /&gt;
The default view in the main page generally provides in real time information about of all the last blocks that are being added to the blockchain, most often separated into six columns with this following informations:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Block height:&#039;&#039;&#039; &amp;lt;ref&amp;gt;Mastering Bitcoin p.28 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;  block number since the Bitcoin [https://en.bitcoin.it/wiki/Genesis_block genesis block] was [https://en.bitcoin.it/wiki/Mining mined]. Each new mined block assumes an increase of one at the height of the block. Thus, the number 492800 in this column means this is the 492800th block mined in the whole history.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Age:&#039;&#039;&#039; the moment when the block was accepted by a miner and not when the user initiated a payment or transfer to another wallet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[https://en.bitcoin.it/wiki/Transaction_confirmation Confirmation]:&#039;&#039;&#039; The most relevant information visible at a glance, the transaction status. If a transaction is «unconfirmed» or «pending», that means the transaction is in the Blockchain, but has not included in a block yet. In average, it takes typically 10 minutes for a bitcoin transaction to be confirmed. It will take about one hour to get «confirmed» by six confirmations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transaction list (TX):&#039;&#039;&#039; number of transactions included in the block. &amp;lt;ref&amp;gt;Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition p.18- Joseph J. Bambara - ISBN 978-1260115871&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reward:&#039;&#039;&#039; the reward for those (miners) who mined the block.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mined by:&#039;&#039;&#039; name of the miner who mined this block. Usually a pool of miners who had been involved in.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Size:&#039;&#039;&#039; size of the transaction obtained by adding the sizes of each transactions included in the block. This data is always provided in bytes.&lt;br /&gt;
&lt;br /&gt;
==The browser==&lt;br /&gt;
&lt;br /&gt;
In the same way as with an Internet browser, the user needs to enter a request to begin his search. It can be a transaction hash or TXID &amp;lt;ref&amp;gt;beginning-blockchain-guide-building-solutions p.278 - Bikramaditya Singhal - ISBN 978-1484234433&amp;lt;/ref&amp;gt;(sequence of 64 characters hexadecimal (0 to 9 and a to f) numbers used to uniquely identify a particular transaction) or a block height for example. Automatically, a page containing all the details about the transaction is loaded according to the request. Advanced information contains all the movements in this transaction and is only available at the user&#039;s request. Most of the time, a bitcoin transaction has several input and output [https://en.bitcoin.it/wiki/Bitcoin_address addresses] insofar as it allows a sender to save time and money by sending to several addresses at once. All the following data will be displayed:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TXID:&#039;&#039;&#039; as mentioned above&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Input:&#039;&#039;&#039;  transaction inputs are pointers to UTXO &amp;lt;ref&amp;gt;Blockchain Enabled Application p.18 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. They point to a specific UTXO by reference to the transaction hash and sequence number where the UTXO is recorded in the blockchain. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output:&#039;&#039;&#039; contains instructions for sending bitcoins &amp;lt;ref&amp;gt;Blockchain Enabled Application p.18 - David Metcalf -  ISBN 978-1484230800&amp;lt;/ref&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Value:&#039;&#039;&#039; the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ScriptPubKey:&#039;&#039;&#039; the second half of a script. There can be more than one output. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if the user doesn&#039;t want to lose it. &amp;lt;ref&amp;gt;beginning-blockchain-guide-building-solutions p.201-202 - Bikramaditya Singhal - ISBN 978-1484234433&amp;lt;/ref&amp;gt; If the input is worth 50 BTC but a consumer only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC. This section is divided into two parts. The first, the top line, showing the total amount that the recipient has to receive in BTC, known as the destination. And the other part, below, showing the amount of bitcoins back to the user that remains in the wallet and which can be used as a new input in a subsequent transaction. Any input bitcoins not redeemed in an output is considered a transaction fee.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transaction Fees:&#039;&#039;&#039; most transactions include transaction fees, which compensate the bitcoin miners for securing the network. Transaction fees serve as an incentive to include (mine) a transaction into the next block and also as a disincentive against “spam” transactions or any kind of abuse of the system, by imposing a small cost on every transaction. Transaction fees are collected by the miner who mines the block that records the transaction on the blockchain. &amp;lt;ref&amp;gt;Mastering Bitcoin p.127 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Coinbase Data:&#039;&#039;&#039; This field must be between 2 and 100 bytes. Except for the first few bytes the rest of the coinbase data can be used by miners in any way they want; it is arbitrary data. In the genesis block, for example, Satoshi Nakamoto added the text “The Times 03/Jan/ 2009 Chancellor on brink of second bailout for banks” in the coinbase data, using it as a proof of the date and to convey a message. Currently, miners use the coinbase data to include extra nonce values and strings identifying the mining pool. &amp;lt;ref&amp;gt;Mastering Bitcoin p.225 - Andreas M. Antonopoulos - ISBN 978-1491954386&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==List of blockchain explorers==&lt;br /&gt;
* https://mempool.space    Open-source Bitcoin Explorer&lt;br /&gt;
* https://bitaps.com	Explorer that supports Segwit&lt;br /&gt;
* https://apirone.com/btc/	Explorer that supports Segwit&lt;br /&gt;
* https://blockstream.info/	&lt;br /&gt;
* https://bitupper.com/en/explorer/bitcoin	Explorer that supports Segwit&lt;br /&gt;
* http://btcblockexplorer.financialplugins.com	&lt;br /&gt;
* https://bitcoinchain.com	&lt;br /&gt;
* https://bitinfocharts.com/bitcoin&lt;br /&gt;
* https://blockchain.info	&lt;br /&gt;
* https://blockchair.com/	Explorer that supports Segwit, privacy centric&lt;br /&gt;
* https://blockexplorer.com/	&lt;br /&gt;
* https://btc.com/	Explorer that supports Segwit	&lt;br /&gt;
* https://chain.so/BTC	&lt;br /&gt;
* https://chainz.cryptoid.info/btc	Explorer that supports Segwit&lt;br /&gt;
* https://explorer.bitcoin.com/btc	&lt;br /&gt;
* https://insight.bitpay.com&lt;br /&gt;
* https://live.blockcypher.com/btc	&lt;br /&gt;
* https://multihash.net	&lt;br /&gt;
* https://btc.blockdozer.com	&lt;br /&gt;
* https://www.blockonomics.co	Explorer that supports Segwit&lt;br /&gt;
* https://www.blocktrail.com/BTC	&lt;br /&gt;
* https://www.smartbit.com.au&lt;br /&gt;
* https://explorer.poolin.com/ Explorer that supports Segwit&lt;br /&gt;
* https://ex.bublina.eu.org - local [BitcoinExplorer](https://bitcoinexplorer.org/) instance&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
	&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69124</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69124"/>
		<updated>2021-12-22T16:47:42Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Faucets */ add alt.signetfaucet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Signet&#039;&#039;&#039; ([[BIP 0325]]) is a new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki BIP-325]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signetfaucet.com/&lt;br /&gt;
* https://alt.signetfaucet.com (the same [https://signetfaucet.bublina.eu.org here])&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
* https://github.com/jsarenik/bitcoin-faucet-shell (POSIX shell)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
* https://mempool.space/signet&lt;br /&gt;
* https://ex.signet.bublina.eu.org&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Until it is merged into master branch, you may first need to check-out (or merge) the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/miner&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we&#039;re going to get an issuer up and running to mine blocks.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll need to provide a value for &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; which is the mining target and is inversely proportional to the difficulty. This will allow us to set the average time between mined blocks.&lt;br /&gt;
&lt;br /&gt;
We can use the &amp;lt;code&amp;gt;calibrate&amp;lt;/code&amp;gt; command to give us the &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; for an average mining time of 10 min (600 s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli&amp;quot; calibrate --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --seconds=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Referring to our &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; value with the variable &amp;lt;code&amp;gt;$NBITS&amp;lt;/code&amp;gt;, we need to specify &amp;lt;code&amp;gt;--set-block-time&amp;lt;/code&amp;gt; when mining the first block in a new signet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --set-block-time=$(date +%s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then mine the first block to that address. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
To keep the mining ongoing from there, aiming for blocks arriving every 10 minutes on average, we can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --ongoing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69056</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69056"/>
		<updated>2021-12-11T20:25:57Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Faucets src */ add POSIX shell implementation of bitcoin-faucet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Signet&#039;&#039;&#039; ([[BIP 0325]]) is a new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki BIP-325]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signetfaucet.com/&lt;br /&gt;
* https://signetfaucet.bublina.eu.org/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
* https://github.com/jsarenik/bitcoin-faucet-shell (POSIX shell)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
* https://mempool.space/signet&lt;br /&gt;
* https://ex.signet.bublina.eu.org&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Until it is merged into master branch, you may first need to check-out (or merge) the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/miner&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we&#039;re going to get an issuer up and running to mine blocks.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll need to provide a value for &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; which is the mining target and is inversely proportional to the difficulty. This will allow us to set the average time between mined blocks.&lt;br /&gt;
&lt;br /&gt;
We can use the &amp;lt;code&amp;gt;calibrate&amp;lt;/code&amp;gt; command to give us the &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; for an average mining time of 10 min (600 s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli&amp;quot; calibrate --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --seconds=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Referring to our &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; value with the variable &amp;lt;code&amp;gt;$NBITS&amp;lt;/code&amp;gt;, we need to specify &amp;lt;code&amp;gt;--set-block-time&amp;lt;/code&amp;gt; when mining the first block in a new signet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --set-block-time=$(date +%s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then mine the first block to that address. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
To keep the mining ongoing from there, aiming for blocks arriving every 10 minutes on average, we can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --ongoing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69032</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69032"/>
		<updated>2021-11-30T13:38:36Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Block explorers */ add ex.signet.bublina&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Signet&#039;&#039;&#039; ([[BIP 0325]]) is a new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki BIP-325]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signetfaucet.com/&lt;br /&gt;
* https://signetfaucet.bublina.eu.org/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
* https://mempool.space/signet&lt;br /&gt;
* https://ex.signet.bublina.eu.org&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Until it is merged into master branch, you may first need to check-out (or merge) the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/miner&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we&#039;re going to get an issuer up and running to mine blocks.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll need to provide a value for &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; which is the mining target and is inversely proportional to the difficulty. This will allow us to set the average time between mined blocks.&lt;br /&gt;
&lt;br /&gt;
We can use the &amp;lt;code&amp;gt;calibrate&amp;lt;/code&amp;gt; command to give us the &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; for an average mining time of 10 min (600 s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli&amp;quot; calibrate --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --seconds=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Referring to our &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; value with the variable &amp;lt;code&amp;gt;$NBITS&amp;lt;/code&amp;gt;, we need to specify &amp;lt;code&amp;gt;--set-block-time&amp;lt;/code&amp;gt; when mining the first block in a new signet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --set-block-time=$(date +%s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then mine the first block to that address. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
To keep the mining ongoing from there, aiming for blocks arriving every 10 minutes on average, we can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --ongoing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69030</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=69030"/>
		<updated>2021-11-29T10:42:35Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Faucets */ Add signetfaucet.bublina.eu.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Signet&#039;&#039;&#039; ([[BIP 0325]]) is a new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki BIP-325]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signetfaucet.com/&lt;br /&gt;
* https://signetfaucet.bublina.eu.org/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
* https://mempool.space/signet&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Until it is merged into master branch, you may first need to check-out (or merge) the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/miner&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we&#039;re going to get an issuer up and running to mine blocks.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll need to provide a value for &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; which is the mining target and is inversely proportional to the difficulty. This will allow us to set the average time between mined blocks.&lt;br /&gt;
&lt;br /&gt;
We can use the &amp;lt;code&amp;gt;calibrate&amp;lt;/code&amp;gt; command to give us the &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; for an average mining time of 10 min (600 s):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli&amp;quot; calibrate --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --seconds=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Referring to our &amp;lt;code&amp;gt;nbits&amp;lt;/code&amp;gt; value with the variable &amp;lt;code&amp;gt;$NBITS&amp;lt;/code&amp;gt;, we need to specify &amp;lt;code&amp;gt;--set-block-time&amp;lt;/code&amp;gt; when mining the first block in a new signet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --set-block-time=$(date +%s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then mine the first block to that address. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
To keep the mining ongoing from there, aiming for blocks arriving every 10 minutes on average, we can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ../contrib/signet/miner --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate --address $ADDR --grind-cmd=&amp;quot;./bitcoin-util grind&amp;quot; --nbits=$NBITS --ongoing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Testnet&amp;diff=68690</id>
		<title>Testnet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Testnet&amp;diff=68690"/>
		<updated>2021-06-06T20:19:28Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Genesis Block */ Change link to mempool.space&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;testnet&#039;&#039;&#039; is an alternative Bitcoin [[block chain]], to be used for testing. Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value. This allows application developers or bitcoin testers to experiment, without having to use real bitcoins or worrying about breaking the main bitcoin chain.&lt;br /&gt;
&lt;br /&gt;
Run bitcoin-qt or bitcoind with the -testnet flag to use the testnet (or put testnet=1 in the bitcoin.conf file).&lt;br /&gt;
&lt;br /&gt;
There have been three generations of testnet. Testnet2 was just the first testnet reset with a different genesis block, because people were starting to trade testnet coins for real money. &#039;&#039;&#039;Testnet3&#039;&#039;&#039; is the current test network. It was introduced with the 0.7 release, introduced a third genesis block, a new rule to avoid the &amp;quot;difficulty was too high, is now too low, and transactions take too long to verify&amp;quot; problem, and contains blocks with edge-case transactions designed to test implementation compatibility. On the December 21 of 2015 SegNet was deployed, to test the Wuille&#039;s Segregated Witness proposal.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
* Default Bitcoin network protocol listen port is 18333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 18332 (instead of 8332)&lt;br /&gt;
* Bootstrapping uses different DNS seeds.&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no testnet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are 0x0B110907 (instead of 0xF9BEB4D9) &lt;br /&gt;
* Minimum [[difficulty]] of 1.0 on testnet is equal to difficulty of 0.5 on mainnet. This means that the mainnet-equivalent of any testnet difficulty is half the testnet difficulty. In addition, if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value.&lt;br /&gt;
* A new genesis block&lt;br /&gt;
* The IsStandard() check is disabled so that non-standard transactions can be experimented with.&lt;br /&gt;
&lt;br /&gt;
==Genesis Block==&lt;br /&gt;
&lt;br /&gt;
Testnet uses a different genesis block to the main network. You can find it [https://mempool.space/testnet/block/000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 here].&lt;br /&gt;
The testnet was [https://github.com/gavinandresen/bitcoin-git/commit/feeb761ba07af74a7cd78b8c8f7c2a961fd9ea1c reset with a new genesis block] for the 0.7 bitcoin release.&lt;br /&gt;
&lt;br /&gt;
==Size==&lt;br /&gt;
Testnet receives less transactions than the main block chain and is typically much smaller in size. As of January 2018 the size of the data on disk was 14GB, containing data for about 6 years worth of testnet activity. Downloading this data required about 12GB of network activity peaking at 2MB/s rate of transfer.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=4483.0 Testnet in a box forum topic]&lt;br /&gt;
* [https://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/ Testnet-In-A-Box self-contained testnet]&lt;br /&gt;
* [https://github.com/freewil/bitcoin-testnet-box Forked/Updated testnet-box]&lt;br /&gt;
&lt;br /&gt;
===Wallets===&lt;br /&gt;
&lt;br /&gt;
Online testnet wallets to help you test your application.&lt;br /&gt;
&lt;br /&gt;
* [http://testnetwallet.com/ TestnetWallet.com]&lt;br /&gt;
* [https://CoPay.io/ CoPay.io] wallet supports TestNet accounts&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done with your test coins, it is a nice gesture to send them back to the faucets, so they become available to other developers.&lt;br /&gt;
* [http://tbtc.bitaps.com bitaps.com Testnet Faucet + double spend test tool]&lt;br /&gt;
* [http://bitcoinfaucet.uo1.net/ UO1 Testnet Faucet]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.mycelium.testnetwallet Mycelium Testnet Wallet for Android with integrated Testnet &amp;quot;faucet&amp;quot; function (Local Trader)]&lt;br /&gt;
* [https://testnet-faucet.mempool.co mempool.co testnet3 Faucet]&lt;br /&gt;
* [http://kuttler.eu/bitcoin/btc/faucet/ nkuttler&#039;s Bitcoin Testnet Faucet]&lt;br /&gt;
&lt;br /&gt;
Offline (2018-09-06):&lt;br /&gt;
&lt;br /&gt;
* [http://tpfaucet.appspot.com/ TP&#039;s TestNet Faucet]&lt;br /&gt;
* [https://testnet.manu.backend.hamburg/faucet flyingkiwi&#039;s TestNet Faucet]&lt;br /&gt;
&lt;br /&gt;
Offline (2016-08-07):&lt;br /&gt;
&lt;br /&gt;
* [http://faucet.luis.im/ luis.im Mojocoin Testnet3 Faucet]&lt;br /&gt;
* [https://accounts.blockcypher.com/testnet-faucet BlockCypher Testnet Faucet], also provided as a [http://dev.blockcypher.com/#faucets Testnet faucet API] for test automation&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
* [https://mempool.space/testnet Bitcoin Testnet on mempool.space]&lt;br /&gt;
* [http://tbtc.bitaps.com/ Bitcoin Testnet Explorer on bitaps.com]&lt;br /&gt;
* [https://www.biteasy.com/testnet/blocks Biteasy.com Testnet Blockexplorer]&lt;br /&gt;
* [http://testnet.blockchain.info Blockchain.info Testnet Explorer]&lt;br /&gt;
* [https://test-insight.bitpay.com/ Bitcoin Testnet on insight.bitpay.com]&lt;br /&gt;
* [https://www.blocktrail.com/tBTC BlockTrail Testnet Explorer, Testnet API and Testnet Faucet]&lt;br /&gt;
* [https://live.blockcypher.com/btc-testnet/ BlockCypher Testnet Explorer]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Testnet&amp;diff=68689</id>
		<title>Testnet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Testnet&amp;diff=68689"/>
		<updated>2021-06-06T18:36:23Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Block explorers */ Remove testnet blockr.io (does not work)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;testnet&#039;&#039;&#039; is an alternative Bitcoin [[block chain]], to be used for testing. Testnet coins are separate and distinct from actual bitcoins, and are never supposed to have any value. This allows application developers or bitcoin testers to experiment, without having to use real bitcoins or worrying about breaking the main bitcoin chain.&lt;br /&gt;
&lt;br /&gt;
Run bitcoin-qt or bitcoind with the -testnet flag to use the testnet (or put testnet=1 in the bitcoin.conf file).&lt;br /&gt;
&lt;br /&gt;
There have been three generations of testnet. Testnet2 was just the first testnet reset with a different genesis block, because people were starting to trade testnet coins for real money. &#039;&#039;&#039;Testnet3&#039;&#039;&#039; is the current test network. It was introduced with the 0.7 release, introduced a third genesis block, a new rule to avoid the &amp;quot;difficulty was too high, is now too low, and transactions take too long to verify&amp;quot; problem, and contains blocks with edge-case transactions designed to test implementation compatibility. On the December 21 of 2015 SegNet was deployed, to test the Wuille&#039;s Segregated Witness proposal.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
* Default Bitcoin network protocol listen port is 18333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 18332 (instead of 8332)&lt;br /&gt;
* Bootstrapping uses different DNS seeds.&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no testnet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are 0x0B110907 (instead of 0xF9BEB4D9) &lt;br /&gt;
* Minimum [[difficulty]] of 1.0 on testnet is equal to difficulty of 0.5 on mainnet. This means that the mainnet-equivalent of any testnet difficulty is half the testnet difficulty. In addition, if no block has been found in 20 minutes, the difficulty automatically resets back to the minimum for a single block, after which it returns to its previous value.&lt;br /&gt;
* A new genesis block&lt;br /&gt;
* The IsStandard() check is disabled so that non-standard transactions can be experimented with.&lt;br /&gt;
&lt;br /&gt;
==Genesis Block==&lt;br /&gt;
&lt;br /&gt;
Testnet uses a different genesis block to the main network. You can find it [https://www.biteasy.com/testnet/blocks/000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 here] or [http://blockexplorer.com/testnet/b/0 here].&lt;br /&gt;
The testnet was [https://github.com/gavinandresen/bitcoin-git/commit/feeb761ba07af74a7cd78b8c8f7c2a961fd9ea1c reset with a new genesis block] for the 0.7 bitcoin release.&lt;br /&gt;
&lt;br /&gt;
==Size==&lt;br /&gt;
Testnet receives less transactions than the main block chain and is typically much smaller in size. As of January 2018 the size of the data on disk was 14GB, containing data for about 6 years worth of testnet activity. Downloading this data required about 12GB of network activity peaking at 2MB/s rate of transfer.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://bitcointalk.org/?topic=4483.0 Testnet in a box forum topic]&lt;br /&gt;
* [https://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/ Testnet-In-A-Box self-contained testnet]&lt;br /&gt;
* [https://github.com/freewil/bitcoin-testnet-box Forked/Updated testnet-box]&lt;br /&gt;
&lt;br /&gt;
===Wallets===&lt;br /&gt;
&lt;br /&gt;
Online testnet wallets to help you test your application.&lt;br /&gt;
&lt;br /&gt;
* [http://testnetwallet.com/ TestnetWallet.com]&lt;br /&gt;
* [https://CoPay.io/ CoPay.io] wallet supports TestNet accounts&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done with your test coins, it is a nice gesture to send them back to the faucets, so they become available to other developers.&lt;br /&gt;
* [http://tbtc.bitaps.com bitaps.com Testnet Faucet + double spend test tool]&lt;br /&gt;
* [http://bitcoinfaucet.uo1.net/ UO1 Testnet Faucet]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.mycelium.testnetwallet Mycelium Testnet Wallet for Android with integrated Testnet &amp;quot;faucet&amp;quot; function (Local Trader)]&lt;br /&gt;
* [https://testnet-faucet.mempool.co mempool.co testnet3 Faucet]&lt;br /&gt;
* [http://kuttler.eu/bitcoin/btc/faucet/ nkuttler&#039;s Bitcoin Testnet Faucet]&lt;br /&gt;
&lt;br /&gt;
Offline (2018-09-06):&lt;br /&gt;
&lt;br /&gt;
* [http://tpfaucet.appspot.com/ TP&#039;s TestNet Faucet]&lt;br /&gt;
* [https://testnet.manu.backend.hamburg/faucet flyingkiwi&#039;s TestNet Faucet]&lt;br /&gt;
&lt;br /&gt;
Offline (2016-08-07):&lt;br /&gt;
&lt;br /&gt;
* [http://faucet.luis.im/ luis.im Mojocoin Testnet3 Faucet]&lt;br /&gt;
* [https://accounts.blockcypher.com/testnet-faucet BlockCypher Testnet Faucet], also provided as a [http://dev.blockcypher.com/#faucets Testnet faucet API] for test automation&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
* [https://mempool.space/testnet Bitcoin Testnet on mempool.space]&lt;br /&gt;
* [http://tbtc.bitaps.com/ Bitcoin Testnet Explorer on bitaps.com]&lt;br /&gt;
* [https://www.biteasy.com/testnet/blocks Biteasy.com Testnet Blockexplorer]&lt;br /&gt;
* [http://testnet.blockchain.info Blockchain.info Testnet Explorer]&lt;br /&gt;
* [https://test-insight.bitpay.com/ Bitcoin Testnet on insight.bitpay.com]&lt;br /&gt;
* [https://www.blocktrail.com/tBTC BlockTrail Testnet Explorer, Testnet API and Testnet Faucet]&lt;br /&gt;
* [https://live.blockcypher.com/btc-testnet/ BlockCypher Testnet Explorer]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68396</id>
		<title>User:Jsarenik</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68396"/>
		<updated>2021-01-27T13:46:15Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: quash -&amp;gt; squash&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Helping with https://en.bitcoin.it/wiki/Signet&lt;br /&gt;
&lt;br /&gt;
I wish I could squash commits on this wiki like in git :-)&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet:Custom:Script&amp;diff=68252</id>
		<title>Signet:Custom:Script</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet:Custom:Script&amp;diff=68252"/>
		<updated>2020-11-12T15:17:44Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: Signet Script: Use -wallet=&amp;quot;test&amp;quot; instead of createwallet || loadwallet (as per https://github.com/bitcoin/bitcoin/pull/15454 and https://github.com/ElementsProject/lightning/pull/4088)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
cd ~/src/bitcoin/src&lt;br /&gt;
&lt;br /&gt;
./bitcoind -regtest -daemon=1 -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
printf &amp;quot;Waiting for regtest bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -regtest getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
ADDR=$(./bitcoin-cli -regtest getnewaddress &#039;&#039; bech32)&lt;br /&gt;
PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
PUBKEY=$(./bitcoin-cli -regtest getaddressinfo $ADDR | jq -r .pubkey)&lt;br /&gt;
&lt;br /&gt;
LENX2=$(printf $PUBKEY | wc -c)&lt;br /&gt;
LEN=$((LENX2/2))&lt;br /&gt;
LENHEX=$(echo &amp;quot;obase=16; $LEN&amp;quot; | bc)&lt;br /&gt;
SCRIPT=$(echo 51${LENHEX}${PUBKEY}51ae)&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF&lt;br /&gt;
ADDR=$ADDR&lt;br /&gt;
PRIVKEY=$PRIVKEY&lt;br /&gt;
PUBKEY=$PUBKEY&lt;br /&gt;
SCRIPT=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -regtest stop 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
datadir=$HOME/signet-custom-$$&lt;br /&gt;
mkdir $datadir&lt;br /&gt;
cat &amp;gt; $datadir/bitcoin.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Waiting for custom Signet bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -datadir=$datadir getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir importprivkey &amp;quot;$PRIVKEY&amp;quot;&lt;br /&gt;
NADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress)&lt;br /&gt;
&lt;br /&gt;
# Examples from&lt;br /&gt;
# https://github.com/bitcoin/bitcoin/pull/19937#issuecomment-696419619&lt;br /&gt;
&lt;br /&gt;
../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --grind-cmd=&#039;./bitcoin-util grind&#039;&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --backdate 0&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --descriptor=&amp;quot;wpkh(...)#...&amp;quot; --secondary&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir getblocktemplate &#039;{&amp;quot;rules&amp;quot;: [&amp;quot;signet&amp;quot;,&amp;quot;segwit&amp;quot;]}&#039; \&lt;br /&gt;
  | ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; genpsbt --address=&amp;quot;$NADDR&amp;quot; \&lt;br /&gt;
  | ./bitcoin-cli -datadir=$datadir -stdin walletprocesspsbt&lt;br /&gt;
&lt;br /&gt;
#../contrib/signet/generate.py solvepsbt --grind-cmd=&#039;./bitcoin-util grind&#039; | ./bitcoin-cli -datadir=$datadir submitblock&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68251</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68251"/>
		<updated>2020-11-12T15:13:45Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: Signet: use -wallet=&amp;quot;test&amp;quot; instead of createwallet || loadwallet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir -wallet=&amp;quot;test&amp;quot;&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68234</id>
		<title>User:Jsarenik</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68234"/>
		<updated>2020-10-18T09:28:40Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Helping with https://en.bitcoin.it/wiki/Signet&lt;br /&gt;
&lt;br /&gt;
I wish I could quash commits on this wiki :-)&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68233</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68233"/>
		<updated>2020-10-18T09:23:48Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Generating keys used for signing a block */ remove REDACTED as per Sjors&amp;#039; comment in https://github.com/bitcoin/bitcoin/pull/19937#pullrequestreview-510970758&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68232</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68232"/>
		<updated>2020-10-18T09:22:59Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Defining the block script */ remove REDACTED as per Sjors&amp;#039; comment in https://github.com/bitcoin/bitcoin/pull/19937#pullrequestreview-510970758&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=5121...51ae # fill in THE_REAL_PUBKEY&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68231</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68231"/>
		<updated>2020-10-18T09:21:06Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Defining the block script */ remove REDACTED as per Sjors&amp;#039; comment in https://github.com/bitcoin/bitcoin/pull/19937#pullrequestreview-510970758&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;5121...51ae&amp;lt;/code&amp;gt;. Where &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; stands for &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (see above).&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68230</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68230"/>
		<updated>2020-10-18T09:19:04Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Defining the block script */ remove REDACTED as per Sjors&amp;#039; comment in https://github.com/bitcoin/bitcoin/pull/19937#pullrequestreview-510970758&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;THE_REAL_PUBKEY&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68229</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68229"/>
		<updated>2020-10-18T09:18:23Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Generating keys used for signing a block */ remove REDACTED as per Sjors&amp;#039; comment in https://github.com/bitcoin/bitcoin/pull/19937#pullrequestreview-510970758&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;THE_REAL_PUBKEY&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68218</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68218"/>
		<updated>2020-10-05T08:32:57Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Custom Signet */ Mention https://github.com/bitcoin/bitcoin/pull/19937&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
NOTE: Until it is merged into master branch, you may first need to check-out the code referred in https://github.com/bitcoin/bitcoin/pull/19937 in order to get the script &amp;lt;code&amp;gt;contrib/signet/generate.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;02c60c3940e5REDACTEDbd0148cd&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68217</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68217"/>
		<updated>2020-10-05T08:27:20Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Getting Started */ signet merged into master branch of Bitcoin Core&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
NOTE: signet (IV) was merged into the master branch of Bitcoin Core as of https://github.com/bitcoin/bitcoin/pull/18267&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/bitcoin/bitcoin&lt;br /&gt;
$ cd bitcoin&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;02c60c3940e5REDACTEDbd0148cd&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68216</id>
		<title>User:Jsarenik</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68216"/>
		<updated>2020-10-02T11:27:46Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: Signet link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Helping with https://en.bitcoin.it/wiki/Signet&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User_talk:Jsarenik&amp;diff=68215</id>
		<title>User talk:Jsarenik</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User_talk:Jsarenik&amp;diff=68215"/>
		<updated>2020-10-02T11:27:00Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to leave any feed-back here.&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68214</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68214"/>
		<updated>2020-10-02T11:25:50Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Custom Signet */ add link to example script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/kallewoof/bitcoin.git signet&lt;br /&gt;
$ cd signet&lt;br /&gt;
$ git checkout signet&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;02c60c3940e5REDACTEDbd0148cd&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
===Example Script===&lt;br /&gt;
&lt;br /&gt;
A full example script can be found at https://en.bitcoin.it/wiki/Signet:Custom:Script&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet:Custom:Script&amp;diff=68213</id>
		<title>Signet:Custom:Script</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet:Custom:Script&amp;diff=68213"/>
		<updated>2020-10-02T11:23:04Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: Add modified version of cdaki&amp;#039;s script from https://gist.github.com/carnhofdaki/60edef577f637ef2dbf4d244e4e279c2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
cd ~/src/bitcoin/src&lt;br /&gt;
&lt;br /&gt;
./bitcoind -regtest -daemon=1&lt;br /&gt;
printf &amp;quot;Waiting for regtest bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -regtest getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -regtest createwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -regtest loadwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
ADDR=$(./bitcoin-cli -regtest getnewaddress &#039;&#039; bech32)&lt;br /&gt;
PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
PUBKEY=$(./bitcoin-cli -regtest getaddressinfo $ADDR | jq -r .pubkey)&lt;br /&gt;
&lt;br /&gt;
LENX2=$(printf $PUBKEY | wc -c)&lt;br /&gt;
LEN=$((LENX2/2))&lt;br /&gt;
LENHEX=$(echo &amp;quot;obase=16; $LEN&amp;quot; | bc)&lt;br /&gt;
SCRIPT=$(echo 51${LENHEX}${PUBKEY}51ae)&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF&lt;br /&gt;
ADDR=$ADDR&lt;br /&gt;
PRIVKEY=$PRIVKEY&lt;br /&gt;
PUBKEY=$PUBKEY&lt;br /&gt;
SCRIPT=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -regtest stop 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
datadir=$HOME/signet-custom-$$&lt;br /&gt;
mkdir $datadir&lt;br /&gt;
cat &amp;gt; $datadir/bitcoin.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoind -datadir=$datadir&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Waiting for custom Signet bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -datadir=$datadir getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir createwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -datadir=$datadir loadwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -datadir=$datadir importprivkey &amp;quot;$PRIVKEY&amp;quot;&lt;br /&gt;
NADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress)&lt;br /&gt;
&lt;br /&gt;
# Examples from&lt;br /&gt;
# https://github.com/bitcoin/bitcoin/pull/19937#issuecomment-696419619&lt;br /&gt;
&lt;br /&gt;
../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --grind-cmd=&#039;./bitcoin-util grind&#039;&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --backdate 0&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --descriptor=&amp;quot;wpkh(...)#...&amp;quot; --secondary&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir getblocktemplate &#039;{&amp;quot;rules&amp;quot;: [&amp;quot;signet&amp;quot;,&amp;quot;segwit&amp;quot;]}&#039; \&lt;br /&gt;
  | ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; genpsbt --address=&amp;quot;$NADDR&amp;quot; \&lt;br /&gt;
  | ./bitcoin-cli -datadir=$datadir -stdin walletprocesspsbt&lt;br /&gt;
&lt;br /&gt;
#../contrib/signet/generate.py solvepsbt --grind-cmd=&#039;./bitcoin-util grind&#039; | ./bitcoin-cli -datadir=$datadir submitblock&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68212</id>
		<title>User:Jsarenik</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Jsarenik&amp;diff=68212"/>
		<updated>2020-10-02T11:19:58Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: gensignet.sh&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
cd ~/src/bitcoin/src&lt;br /&gt;
&lt;br /&gt;
./bitcoind -regtest -daemon=1&lt;br /&gt;
printf &amp;quot;Waiting for regtest bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -regtest getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -regtest createwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -regtest loadwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
ADDR=$(./bitcoin-cli -regtest getnewaddress &#039;&#039; bech32)&lt;br /&gt;
PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
PUBKEY=$(./bitcoin-cli -regtest getaddressinfo $ADDR | jq -r .pubkey)&lt;br /&gt;
&lt;br /&gt;
LENX2=$(printf $PUBKEY | wc -c)&lt;br /&gt;
LEN=$((LENX2/2))&lt;br /&gt;
LENHEX=$(echo &amp;quot;obase=16; $LEN&amp;quot; | bc)&lt;br /&gt;
SCRIPT=$(echo 51${LENHEX}${PUBKEY}51ae)&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF&lt;br /&gt;
ADDR=$ADDR&lt;br /&gt;
PRIVKEY=$PRIVKEY&lt;br /&gt;
PUBKEY=$PUBKEY&lt;br /&gt;
SCRIPT=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -regtest stop 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
datadir=$HOME/signet-custom-$$&lt;br /&gt;
mkdir $datadir&lt;br /&gt;
cat &amp;gt; $datadir/bitcoin.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=$SCRIPT&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
./bitcoind -datadir=$datadir&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Waiting for custom Signet bitcoind to start&amp;quot;&lt;br /&gt;
while ! ./bitcoin-cli -datadir=$datadir getconnectioncount 2&amp;gt;/dev/null 1&amp;gt;&amp;amp;2&lt;br /&gt;
do printf .; sleep 1&lt;br /&gt;
done; echo&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir createwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -datadir=$datadir loadwallet default &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
./bitcoin-cli -datadir=$datadir importprivkey &amp;quot;$PRIVKEY&amp;quot;&lt;br /&gt;
NADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress)&lt;br /&gt;
&lt;br /&gt;
# Examples from&lt;br /&gt;
# https://github.com/bitcoin/bitcoin/pull/19937#issuecomment-696419619&lt;br /&gt;
&lt;br /&gt;
../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --grind-cmd=&#039;./bitcoin-util grind&#039;&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --address=&amp;quot;$NADDR&amp;quot; --backdate 0&lt;br /&gt;
#../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 1 --block-time=1 --descriptor=&amp;quot;wpkh(...)#...&amp;quot; --secondary&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir getblocktemplate &#039;{&amp;quot;rules&amp;quot;: [&amp;quot;signet&amp;quot;,&amp;quot;segwit&amp;quot;]}&#039; \&lt;br /&gt;
  | ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; genpsbt --address=&amp;quot;$NADDR&amp;quot; \&lt;br /&gt;
  | ./bitcoin-cli -datadir=$datadir -stdin walletprocesspsbt&lt;br /&gt;
&lt;br /&gt;
#../contrib/signet/generate.py solvepsbt --grind-cmd=&#039;./bitcoin-util grind&#039; | ./bitcoin-cli -datadir=$datadir submitblock&lt;br /&gt;
&lt;br /&gt;
./bitcoin-cli -datadir=$datadir stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68211</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68211"/>
		<updated>2020-10-02T11:12:49Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Generating keys used for signing a block */ create and loadwallet needed on new bitcoind if the wallet does not exist, will not hurt otherwise&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/kallewoof/bitcoin.git signet&lt;br /&gt;
$ cd signet&lt;br /&gt;
$ git checkout signet&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ./bitcoin-cli -regtest createwallet default&lt;br /&gt;
$ ./bitcoin-cli -regtest loadwallet default&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;02c60c3940e5REDACTEDbd0148cd&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68210</id>
		<title>Signet</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Signet&amp;diff=68210"/>
		<updated>2020-10-02T11:06:41Z</updated>

		<summary type="html">&lt;p&gt;Jsarenik: /* Custom Signet */ update issuer instructions to contain current initial wallet dance and fix -regtest stop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Signet ([[BIP 0325]]) is a proposed new test network for Bitcoin which adds an additional signature requirement to block validation. Signet is similar in nature to [[testnet]], but more reliable and centrally controlled. There is a default signet network (&amp;quot;Signet Global Test Net VI&amp;quot; as of this writing), but anyone can run their own signet network at their whim.&lt;br /&gt;
&lt;br /&gt;
Run bitcoind with the &amp;lt;code&amp;gt;-signet&amp;lt;/code&amp;gt; flag to use the default global signet (or put &amp;lt;code&amp;gt;signet=1&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;bitcoin.conf&amp;lt;/code&amp;gt; file). If you wish to use a [[#Custom Signet|custom signet]], you need to provide the block challenge (aka the block script) using &amp;lt;code&amp;gt;-signetchallenge=&amp;lt;hex&amp;gt;&amp;lt;/code&amp;gt;, and preferably also at least one seed node using &amp;lt;code&amp;gt;-signetseednode=&amp;lt;host&amp;gt;[:&amp;lt;port&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Differences==&lt;br /&gt;
&lt;br /&gt;
* Default Bitcoin network protocol listen port is 38333 (instead of 8333)&lt;br /&gt;
* Default RPC connection port is 38332 (instead of 8332)&lt;br /&gt;
* A different value of ADDRESSVERSION field ensures no signet Bitcoin addresses will work on the production network. (0x6F rather than 0x00)&lt;br /&gt;
* The protocol message header bytes are *dynamically generated* based on the block challenge, i.e. every signet is different; the header for the current default signet is &amp;lt;code&amp;gt;0x0A03CF40&amp;lt;/code&amp;gt; (that is reversed e.g. in Rust variables) (instead of &amp;lt;code&amp;gt;0xF9BEB4D9&amp;lt;/code&amp;gt;), but see [[#Genesis_Block_and_Message_Header]]&lt;br /&gt;
* Genesis block has timestamp 1598918400, nonce 52613770, and difficulty 0x1e0377ae.&lt;br /&gt;
* Segwit is always enabled&lt;br /&gt;
* Additional consensus requirement that the coinbase witness commitment contains an extended signet commitment, which is a script satisfying the block script (usually a k-of-n multisig)&lt;br /&gt;
&lt;br /&gt;
==Why run Signet?==&lt;br /&gt;
&lt;br /&gt;
* You are an Instructor, and want to run a controlled Bitcoin network environment for teaching purposes.&lt;br /&gt;
* You are a Software Developer, and want to test your software.&lt;br /&gt;
* You want to try out experimental changes that you want to implement in Bitcoin.&lt;br /&gt;
* You want to test long-term running software and don&#039;t want to deal with tens of thousands of block reorgs, or days of no blocks being mined, as is the case with Testnet.&lt;br /&gt;
* You want an easy way to test double spends (signet plans to include support for automated double spends, where you provide two conflicting transactions and they are mined in order, with a reorg happening between them).&lt;br /&gt;
&lt;br /&gt;
==Genesis Block and Message Header==&lt;br /&gt;
&lt;br /&gt;
All signet networks share the same genesis block, but have a different message header. The message header is the 4 first bytes of the sha256d-hash of the block challenge, as a single script push operation. I.e. if the block challenge is 37 bytes, the message start would be sha256d(0x25 || challenge)[0..3].&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
===Fetch and compile signet===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone https://github.com/kallewoof/bitcoin.git signet&lt;br /&gt;
$ cd signet&lt;br /&gt;
$ git checkout signet&lt;br /&gt;
$ ./autogen.sh&lt;br /&gt;
$ ./configure&lt;br /&gt;
$ make -j5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create bitcoin.conf file and start up the daemon===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd src&lt;br /&gt;
$ mkdir signet&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
daemon=1&amp;quot; &amp;gt; signet/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=signet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Verify that you&#039;re connected===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getconnectioncount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getblockcount&lt;br /&gt;
***SHOULD BE MORE THAN ZERO***&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get some coins===&lt;br /&gt;
&lt;br /&gt;
There is a command line tool you can use to get coins directly to your instance of Signet, assuming you are on the default network. You can also use the faucet online with an address of yours.&lt;br /&gt;
&lt;br /&gt;
====Using online faucet====&lt;br /&gt;
&lt;br /&gt;
You first need an address&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getnewaddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go to a faucet, e.g. https://signet.bc-2.jp and enter your address.&lt;br /&gt;
&lt;br /&gt;
====Using the command line tool====&lt;br /&gt;
&lt;br /&gt;
The tool is in &amp;lt;code&amp;gt;contrib/signet&amp;lt;/code&amp;gt; and is called &amp;lt;code&amp;gt;getcoins.sh&amp;lt;/code&amp;gt;. You can optionally provide a path to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--cmd=[path]&amp;lt;/code&amp;gt; and a compatible faucet using &amp;lt;code&amp;gt;--faucet=[url]&amp;lt;/code&amp;gt; followed by any number of arguments to &amp;lt;code&amp;gt;bitcoin-cli&amp;lt;/code&amp;gt;. The script attempts to autodetect these if left out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../contrib/signet&lt;br /&gt;
$ ./getcoins.sh -datadir=../../src/signet&lt;br /&gt;
Payment of 10.00000000 BTC sent with txid c0bfa...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Check that you received the coins===&lt;br /&gt;
&lt;br /&gt;
Check your faucet transaction confirming at e.g. https://explorer.bc-2.jp and then send coins around to people and/or use signet for testing your wallet/etc.&lt;br /&gt;
&lt;br /&gt;
You can immediately see the amount using &amp;lt;code&amp;gt;getunconfirmedbalance&amp;lt;/code&amp;gt; i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ../../src # if you were in contrib/signet&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getunconfirmedbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also see info about the transaction that the faucet gave you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet gettransaction THETXID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it has confirmed, you should see it in &amp;lt;code&amp;gt;getbalance&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -datadir=signet getbalance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/18267 Pull request #18267 to Bitcoin Core]&lt;br /&gt;
* [https://github.com/rust-bitcoin/rust-bitcoin/pull/291 Pull request #291 to Rust-Bitcoin]&lt;br /&gt;
* [https://gist.github.com/kallewoof/98b6d8dbe126d2b6f47da0ddccd2aa5a Github gist explaining how to get started]&lt;br /&gt;
&lt;br /&gt;
===Faucets===&lt;br /&gt;
&lt;br /&gt;
* https://signet.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
Can also ping @kallewoof on IRC (freenode)/Twitter.&lt;br /&gt;
&lt;br /&gt;
Faucet source code, if you want your own:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/kallewoof/bitcoin-faucet.git (node.js and mongodb)&lt;br /&gt;
* https://github.com/stepansnigirev/tinyfaucet.git (python)&lt;br /&gt;
&lt;br /&gt;
===Block explorers===&lt;br /&gt;
&lt;br /&gt;
* https://explorer.bc-2.jp/&lt;br /&gt;
&lt;br /&gt;
==Custom Signet==&lt;br /&gt;
&lt;br /&gt;
Creating your own signet involves a couple of steps: generate keys used for signing, define the block script, start up a node running on the new signet, and import the private key in order to sign blocks.&lt;br /&gt;
&lt;br /&gt;
===Generating keys used for signing a block===&lt;br /&gt;
&lt;br /&gt;
The most straightforward way is to simply start up a regtest node and then generating a new key from there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd PATHTOBITCOIN/bitcoin/src&lt;br /&gt;
$ ./bitcoind -regtest -daemon&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -regtest getnewaddress)&lt;br /&gt;
$ PRIVKEY=$(./bitcoin-cli -regtest dumpprivkey $ADDR)&lt;br /&gt;
$ ./bitcoin-cli -regtest getaddressinfo $ADDR | grep pubkey&lt;br /&gt;
  &amp;quot;pubkey&amp;quot;: &amp;quot;02c60c3940e5REDACTEDbd0148cd&amp;quot;,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to jot down the privkey (&amp;lt;code&amp;gt;echo $PRIVKEY&amp;lt;/code&amp;gt;) and the pubkey (here &amp;lt;code&amp;gt;02c60...&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Defining the block script===&lt;br /&gt;
&lt;br /&gt;
The block script is just like any old Bitcoin script, but the most common type is a k-of-n multisig. Here we will do a 1-of-1 multisig with our single pubkey above. Our script becomes&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (signature count)&lt;br /&gt;
* &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt; Push 0x21=33 bytes (the length of our pubkey above)&lt;br /&gt;
* &amp;lt;code&amp;gt;02c60c3940e5REDACTEDbd0148cd&amp;lt;/code&amp;gt; (our pubkey)&lt;br /&gt;
* &amp;lt;code&amp;gt;51&amp;lt;/code&amp;gt; &amp;quot;1&amp;quot; (pubkey count)&lt;br /&gt;
* &amp;lt;code&amp;gt;ae&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;OP_CHECKMULTISIG&amp;lt;/code&amp;gt; opcode&lt;br /&gt;
&lt;br /&gt;
Put together, our &amp;lt;code&amp;gt;-signetchallenge&amp;lt;/code&amp;gt; value becomes &amp;lt;code&amp;gt;512102c60c3940e5REDACTEDbd0148cd51ae&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Start up a node (issuer)===&lt;br /&gt;
&lt;br /&gt;
For the network to be useful, it needs to be generating blocks at decent intervals, so let&#039;s start up a node that does that (it may be useful to also use that node as a seed node for other peers).&lt;br /&gt;
&lt;br /&gt;
Note that we are importing &amp;lt;code&amp;gt;$PRIVKEY&amp;lt;/code&amp;gt; at the end; any node that needs to issue blocks must import the privkey we generated above, or it will fail to sign blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bitcoin-cli -regtest stop&lt;br /&gt;
$ datadir=$HOME/signet-custom&lt;br /&gt;
$ mkdir $datadir&lt;br /&gt;
$ echo &amp;quot;signet=1&lt;br /&gt;
[signet]&lt;br /&gt;
daemon=1&lt;br /&gt;
signetchallenge=512102c60c3940e5REDACTEDbd0148cd51ae&amp;quot; &amp;gt; $datadir/bitcoin.conf&lt;br /&gt;
$ ./bitcoind -datadir=$datadir&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir createwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir loadwallet default&lt;br /&gt;
$ ./bitcoin-cli -datadir=$datadir importprivkey $PRIVKEY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: if you run into errors above, you may have a different signet running, which is blocking the ports. Either stop that, or set port and rpcport in the &amp;lt;code&amp;gt;$datadir/bitcoin.conf&amp;lt;/code&amp;gt; file under the &amp;lt;code&amp;gt;[signet]&amp;lt;/code&amp;gt; section and try again from the &amp;lt;code&amp;gt;bitcoind&amp;lt;/code&amp;gt; part above.&lt;br /&gt;
&lt;br /&gt;
===Run issuer===&lt;br /&gt;
&lt;br /&gt;
Lastly, we start an issuer using &amp;lt;code&amp;gt;bitcoin-util&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ADDR=$(./bitcoin-cli -datadir=$datadir getnewaddress); ../contrib/signet/generate.py --cli=&amp;quot;./bitcoin-cli -datadir=$datadir&amp;quot; generate 0 --address $ADDR --grind-cmd=&#039;./bitcoin-util grind&#039; --block-time=600&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create an address, and then start mining to that address, aiming for blocks arriving every 10 minutes on average. (Note that you may need to create a wallet first.)&lt;br /&gt;
&lt;br /&gt;
Next is to have your friends/colleagues/etc join the network by setting the &amp;lt;code&amp;gt;signetchallenge&amp;lt;/code&amp;gt; to the same as above, and connecting to your node.&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
{{Bitcoin Core documentation}}&lt;/div&gt;</summary>
		<author><name>Jsarenik</name></author>
	</entry>
</feed>