-
Notifications
You must be signed in to change notification settings - Fork 17
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
refactor genesis handling to allow changing ChainID #1307
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
altergui
commented
Apr 29, 2024
•
edited
Loading
edited
Pull Request Test Coverage Report for Build 9208343016Details
💛 - Coveralls |
altergui
force-pushed
the
feat/genesis-fake-hash
branch
2 times, most recently
from
May 8, 2024 12:16
8367c77
to
d66b908
Compare
altergui
force-pushed
the
feat/genesis-fake-hash
branch
from
May 8, 2024 12:22
d66b908
to
6e45f7d
Compare
altergui
force-pushed
the
feat/genesis-fake-hash
branch
from
May 8, 2024 12:26
6e45f7d
to
1f020f9
Compare
altergui
changed the title
refactor genesis handling to allow changing ChainID (WIP)
refactor genesis handling to allow changing ChainID
May 8, 2024
altergui
force-pushed
the
feat/genesis-fake-hash
branch
2 times, most recently
from
May 8, 2024 12:35
e20db43
to
e1e345f
Compare
ready for review |
compose test is failing due to a oneliner bug, i'll fix it asap but please ignore the failure, the PR is still ready to review |
altergui
force-pushed
the
feat/genesis-fake-hash
branch
from
May 13, 2024 11:27
e1e345f
to
cc8f620
Compare
i fixed that bug but now hit another one, related to keykeeper, something is wrong during init, been chasing this and i'll push a fix asap. nevertheless, the essence of the PR will not change. |
altergui
force-pushed
the
feat/genesis-fake-hash
branch
11 times, most recently
from
May 16, 2024 12:35
8d48a21
to
2284015
Compare
t.dataDir stopped being used in be824ae "clean commented codeblocks..." but these leftovers were left behind
altergui
force-pushed
the
feat/genesis-fake-hash
branch
from
May 23, 2024 12:39
f399ae2
to
13a4ec5
Compare
* don't pass genesisBytes as arg on SetNode, NewVochain, newTendermint, etc * notably, now cometbft has it's own datadir separate from our state, allowing to wipe cometbft data without wiping our state. * drop genesis.AutoUpdateGenesis * instead of comparing local and hardcoded genesis Hash, compare ChainID to decide wether to wipe out just cometbft, whole datadir, or do nothing * cmd/node: add flags to override genesis ChainID, InitialHeight and AppHash * cmd/node: add flag to schedule an EndOfChain (a new field of genesis.Doc) * move SeedNodes from genesis into config package (DefaultSeedNodes) * add config consts: DefaultCometBFTPath and DefaultGenesisPath * testsuite: use genesis.go instead of hardcoded genesis.json this increases the code coverage of testsuite and helps developing refactors of genesis.go * now testsuite network is `test` (instead of `dev`) * app.genesisDoc is now populated during newTendermint, instead of pulling from app.NodeClient.Genesis, since it's needed during Info() handshake * cometbft: removed redundant app.State.SetHeight(lastHeight) during Info() * cometbft: now Info() supports doing a chain bump, if genesis InitialHeight > lastHeight * cometbft: now ProcessProposal supports stopping the current chain at height config.Forks.EndOfChain * genesis: remove copypasted types, use upstream comettypes directly * genesis: deduplicate ConsensusParams literals using DefaultBlockParams, etc * genesis: remove useless hardcoded StateSyncParams * genesis: add some unit tests: TestSaveAsAndLoad, TestAvailableNetworks
altergui
force-pushed
the
feat/genesis-fake-hash
branch
from
May 23, 2024 12:52
8139b7d
to
2a1643f
Compare
p4u
approved these changes
Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.