Since signet_header is set as a constant, personal signet cannot be created. The v0.21.0 release notes say 'It is also possible to create personal signets. `.
Fix a bug that personal signet can not be created. #20970
pull fujicoin wants to merge 1 commits into bitcoin:master from fujicoin:fix-personal-signet changing 1 files +7 −3-
fujicoin commented at 4:20 AM on January 20, 2021: none
-
Fix a bug that personal signet can not be created. 48668e65d7
-
ajtowns commented at 7:31 AM on January 20, 2021: member
You create a personal (aka custom) signet by changing the signet challenge (with
-signetchallenge) and pointing at a fresh datadir. The signet header is just used to identify the challenge response in the coinbase. -
MarcoFalke commented at 7:55 AM on January 20, 2021: member
The
SIGNET_HEADERis a bit like a file type magic (edit: maybe not the best comparison), so it must be constant. Closing. - MarcoFalke closed this on Jan 20, 2021
-
fujicoin commented at 10:06 AM on January 20, 2021: none
You create a personal (aka custom) signet by changing the signet challenge (with
-signetchallenge) and pointing at a fresh datadir. The signet header is just used to identify the challenge response in the coinbase.Personal signets cannot be created even if pointing at a fresh datadir. When mining is done, the block is rejected with
submit block returned bad-signet-blksig for height 1. It's natural because SIGNET_HEADER causes a mismatch. -
fujicoin commented at 10:11 AM on January 20, 2021: none
The
SIGNET_HEADERis a bit like a file type magic (edit: maybe not the best comparison), so it must be constant. Closing.SIGNET_HEADER is only used in two places in signet.cpp, not elsewhere. Where does it need to be constant?
-
fujicoin commented at 10:17 AM on January 20, 2021: none
★ Anyway, no one can launch a personal signet with the released bitcoin v0.21.0.
-
sipa commented at 10:42 PM on January 21, 2021: member
Why does a personal signet need a separate network magic?
-
fujicoin commented at 12:46 AM on January 22, 2021: none
A personal signet requires a personal signet challenge. The signet network magic is defined by the signet challenge. Therefore, network magic will be different for each personal signet. The signet commitment included in the coinbase transaction includes the signet header (magic). It is verified with the following code. https://github.com/bitcoin/bitcoin/blob/95ea54ba089610019a74c1176a2c7c0dba144b1c/src/signet.cpp#L41 If SIGNET_HEADER is specified as a constant on the 26th line, the personal signet block will be rejected. In the case of bitcoin v0.21.0, personal signet will not start just by modifying signet.cpp.
-
ajtowns commented at 5:50 AM on January 22, 2021: member
Why does a personal signet need a separate network magic?
signet network magic is defined as the first four bytes of the sha256d of the signet challenge, so since a personal signet will have a unique challenge, each personal signet will also have an approximately unique network magic, which helps avoid accidently merging two incompatible personal signets at the p2p layer.
SIGNET_HEADER is a different value, though -- it just identifies which part of the witness commitment is the block signature, and (as it stands, without this pr) doesn't differ between signets. It's similar to the witness commitment identifier; it's not the same as the signet network magic.
-
fujicoin commented at 8:24 AM on January 22, 2021: none
Well, I was confused with Signet derived magic (message start) from the name SIGNET_HEADER. That's a different value than the default signet magic (0a03cf40). I understand it very well, thank you.
- fujicoin deleted the branch on Jan 22, 2021
- fanquake locked this on Feb 22, 2021