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

fix(trie): dont save root hash twice #61

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

jyc228
Copy link
Contributor

@jyc228 jyc228 commented Jan 16, 2024

Description

Previously, there was a bug that prevented the chain from running because the genesis block was not found after the ethereum/go-ethereum#26703 commit. It was solved by reversing the root hash when committing and saving it once more, but this resulted in using about 90 bytes of disk space per block and slowed down the block generation speed by about 30ms. (About 60ms -> 90m for 1 tx block, see related commit 6f7eadc )
This commit fixes the above.

@jyc228 jyc228 requested a review from a team January 16, 2024 09:25
@jyc228 jyc228 force-pushed the fix/do-not-save-roothash-twice branch from 83ca498 to 66aace1 Compare January 16, 2024 09:32
Copy link
Contributor

@kangsorang kangsorang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jyc228 jyc228 force-pushed the fix/do-not-save-roothash-twice branch from 66aace1 to 77a3b33 Compare January 17, 2024 08:10
Copy link
Contributor

@seolaoh seolaoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jyc228 jyc228 merged commit beb6458 into dev Jan 17, 2024
2 checks passed
@jyc228 jyc228 deleted the fix/do-not-save-roothash-twice branch January 17, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants