Skip to content
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

Don't write genesis to storage on restart #3151

Closed
mikhailOK opened this issue Aug 12, 2020 · 0 comments · Fixed by #3470
Closed

Don't write genesis to storage on restart #3151

mikhailOK opened this issue Aug 12, 2020 · 0 comments · Fixed by #3470
Assignees
Labels
A-chain Area: Chain, client & related A-storage Area: storage and databases

Comments

@mikhailOK
Copy link
Contributor

Discovered in #3065. It's faster after the fix, but we should also not write genesis state again.

@bowenwang1996 bowenwang1996 added A-chain Area: Chain, client & related A-storage Area: storage and databases labels Aug 31, 2020
mikhailOK added a commit that referenced this issue Oct 8, 2020
- When the node starts for the first time, save the hash of genesis in
storage, and assert on every restart that same genesis is used.

- Save the genesis state roots on first start, and don't rebuild the
trie on every restart.

Fixes #3151
Fixes #3063

Test plan
---------
existing tests
mikhailOK added a commit that referenced this issue Oct 8, 2020
- When the node starts for the first time, save the hash of genesis in
storage, and assert on every restart that same genesis is used.

- Save the genesis state roots on first start, and don't rebuild the
trie on every restart.

Fixes #3151
Fixes #3063

Test plan
---------
existing tests
mikhailOK added a commit that referenced this issue Oct 8, 2020
- When the node starts for the first time, save the hash of genesis in
storage, and assert on every restart that same genesis is used.

- Save the genesis state roots on first start, and don't rebuild the
trie on every restart.

Fixes #3151
Fixes #3063

Test plan
---------
existing tests
mikhailOK added a commit that referenced this issue Oct 8, 2020
- When the node starts for the first time, save the hash of genesis in
storage, and assert on every restart that same genesis is used.

- Save the genesis state roots on first start, and don't rebuild the
trie on every restart.

Fixes #3151
Fixes #3063

Test plan
---------
existing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chain Area: Chain, client & related A-storage Area: storage and databases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants