if (block.GetHash() != chainparams.GetConsensus().hashGenesisBlock)
here and there.
I also add some tests to checkpoints. They’re not very important since the asserts in chainparams would already detect any change in the genesis block, but it makes sure that “the checkpoint logic can always trust the first checkpoint”.
In fact, the genesis checkpoint is that is immune to reorgs, by definition.
The genesis block is the first rule and the only true chain ID (because one based in names would require a memorable-ID system [and those are centralized and/or vulnerable to squatting]).
(Shares base commit with #6229)
Checkpoints: The hash of the genesis block it’s the genesis checkpoint #6230
pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:chainparams-genesis changing 1 files +3 −1-
jtimon commented at 10:37 am on June 4, 2015: contributorIt’s nicer to have all the hardcoded hashes of the genesis blocks of the respective supported chains together. More importantly, all chains should have the genesis block as checkpoint. That way the checkpoint logic can always trust the first checkpoint and hopefully we will be able to save some
-
jtimon force-pushed on Jun 4, 2015
-
jtimon renamed this:
Chainparams: The hash of the genesis block it's the genesis checkpoint and chain id
Chainparams: The hash of the genesis block is the genesis checkpoint and chain id
on Jun 4, 2015 -
laanwj added the label Refactoring on Jun 9, 2015
-
jtimon force-pushed on Jun 21, 2015
-
jtimon force-pushed on Jun 21, 2015
-
jtimon force-pushed on Jun 26, 2015
-
jtimon commented at 3:56 pm on June 26, 2015: contributorRebased after merging #6299. Apart from its original form, now this PR additionally has the a removal of the now-unnecessary check for the genesis hash block (and an additional big indentation commit). Let’s wait for testing, I think it was safer to just merge #6299, but I truly believe the existence of a fully-trustable genesis checkpoint is the necessary step for decoupling the checkpoint logic from any notion of chainparams or a genesis block hash. I think I’m finding enough prove that problems can spring by not doing so and - still - this PR would be minimal if the enum-to-string was merged somewhere else (like in the currently closed #6229 or an improved subset of it) and ignoring the trivially-verifiable indentation.
-
jtimon force-pushed on Jun 26, 2015
-
jtimon force-pushed on Jun 26, 2015
-
jtimon force-pushed on Jun 30, 2015
-
jtimon force-pushed on Jul 1, 2015
-
jtimon force-pushed on Jul 1, 2015
-
jtimon force-pushed on Jul 1, 2015
-
jtimon commented at 9:35 pm on July 1, 2015: contributor
Yes, @sdaftuar , you’re right, this is no alternative fix of #6299 . I was testing it wrong, but fortunately qa/rpc-tests/reindex.py noticed, great! I removed everything but the single commit introducing the “genesis checkpoints”, which @TheBlueMatt should like because he did the equivalent for alpha-0.10. If @luke-jr rebases #5987 on top of this I can close the PR.
In summary and to reiterate, there’s no reason not to have the genesis block as a checkpoint: it’s the best checkpoint you will ever have! by definition!
-
jtimon renamed this:
Chainparams: The hash of the genesis block is the genesis checkpoint and chain id
Checkpoints: The hash of the genesis block it's the genesis checkpoint
on Jul 1, 2015 -
Checkpoints: The hash of the genesis block it's the genesis checkpoint 0c576b2eaa
-
jtimon force-pushed on Jul 2, 2015
-
jtimon closed this on Jul 6, 2015
-
DrahtBot locked this on Sep 8, 2021
Labels
Refactoring
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me