-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The witness node's blockchain ID is dependent on the binary structure of the genesis file #545
Comments
How did you download the first file? Specifically what URL did you go to, what browser did you use, and what version? Did it load the |
Hmm, https://help.github.com/articles/dealing-with-line-endings/ may have information. I wonder why our existing Windows builds aren't bitten by this? Maybe the folks who build it are downloading a tarball instead of doing a checkout. |
I am not sure the OP is talking about the public BTS network and your windows build. I think he was talking about the testnetwork setup. https://github.com/bitshareseurope/graphene-testnet/ What is wired is that if I compile the above version in Release mode (no explicit egenesis), and let it include the |
Yes. I'm talking about the testnet and Windows 10. I did not encounter a similar problem on the public BTS network - I've manged to compile the witness node on Windows and use it without problems with the embedded genesis file. So it's just the testnet where we have this issue.
In the first case the file was cloned with the rest of the repository using the I'm using FF 44.0 on Windows 10. |
OK, I think I now have enough information to close this issue! When launching a long-lived chain, we use
which removes whitespace and sorts keys in JSON dictionaries ("canonical" in removing several formatting changes). This will remove all newline characters from your genesis file (newlines embedded in strings will be written as escape sequences and won't be actual characters in the file). This is why the issue doesn't affect us -- we always use My suggestions are:
|
Copy-pasted the above points and added a reference to this ticket to the egenesis wiki article. |
The process of generating blockchain ID is dependent on the binary structure of the
genesis.json
file. As a result, two files that are treated as equal by github produce different behavior of the witness node, i.e. different blockchain IDs are generated when the witness node is run with these commands:where
genesis1.json
andgenesis2.json
are seen as equal files by github but their binary structure is different, as seen on those snapshots:This behavior causes problems when a witness node tries to join an existing network - it's not able to do so because it expects a different blockchain ID even though the
genesis.json
file has been cloned from the same repository.(One could say it's a github bug but unfortunately this is how github works - it's not guaranteed that the binary structure of a text file is the same on all OS).
The text was updated successfully, but these errors were encountered: