Skip to content

Commit

Permalink
doc: add note on creating signet
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelrogstad authored and octobocto committed Oct 7, 2024
1 parent 111a612 commit 668fd4f
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions l2l-signet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Instructions on setting up the signet. This is using Fish shell, but should be
easy enough to get the gist if using an inferior shell like Bash or Zsh.

1. Create the appropriate configuration file for our network:

```conf
signet=1
# 1 minute block times. Note that /everyone/ who connects to this signet
# must have this exact configuration value.
signetblocktime=60
```
1. Generate the private key used to sign blocks + corresponding
`signetchallenge` value.
```fish
$ mkdir l2l-signet
$ ./build/src/bitcoind -daemon -regtest -datadir=$PWD/l2l-signet
$ ./build/src/bitcoin-cli -regtest -datadir=$PWD/l2l-signet \
createwallet l2l-signet
$ set signet_challenge (./build/src/bitcoin-cli -regtest -datadir=$PWD/l2l-signet \
getaddressinfo $address | jq -r .scriptPubKey)
$ echo signetchallenge=$signet_challenge >> l2l-signet/bitcoin.conf
# Need the wallet descriptors to be able to import the wallet into
$ set descriptors (./build/src/bitcoin-cli -regtest -datadir=$PWD/l2l-signet \
listdescriptors true | jq -r .descriptors)
# We're finished with the regtest wallet!
$ ./build/src/bitcoin-cli -regtest -datadir=$PWD/l2l-signet stop
```
1. Create the signet wallet
```fish
$ ./build/src/bitcoind -daemon -signet -datadir=$PWD/l2l-signet
$ ./build/src/bitcoin-cli -signet -datadir=$PWD/l2l-signet \
createwallet l2l-signet
$ ./build/src/bitcoin-cli signet -datadir=$PWD/l2l-signet \
importdescriptors "$descriptors"
```
1. Start mining on our network:
```fish
$ set address (./build/src/bitcoin-cli -signet -datadir=$PWD/l2l-signet getnewaddress)
$ ./contrib/signet/miner \
--cli "bitcoin-cli -signet -datadir=$PWD/l2l-signet" \
generate --address $address \
--grind-cmd "$PWD/build/src/bitcoin-util grind" \
--min-nbits --ongoing --block-interval 60
```
```

```
```

```

0 comments on commit 668fd4f

Please sign in to comment.