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

Remove unnecessary node read #101

Merged
merged 3 commits into from
May 6, 2020

Conversation

carver
Copy link
Contributor

@carver carver commented May 6, 2020

What was wrong?

The squash_changes was always reading the root node, even if the trie was never modified. The correct behavior here is to not read out the root node from the database.

This might be relevant when building witnesses.

How was it fixed?

Check if the root hash changed, before reading out the old root node from the database.

Cute Animal Picture

Cute animal picture

carver added 3 commits May 6, 2020 15:24
This avoids "touching" trie nodes that don't need to be read. This
is important in cases like building witnesses based on nodes that are
read out from the database.
@carver carver force-pushed the remove-unnecessary-node-read branch from 156690d to 478f13f Compare May 6, 2020 22:44
@carver
Copy link
Contributor Author

carver commented May 6, 2020

I verified locally that f8a4f17 fails before ab56d69 is applied.

@carver carver requested a review from pipermerriam May 6, 2020 22:48
@carver carver merged commit 26573d8 into ethereum:master May 6, 2020
@carver carver deleted the remove-unnecessary-node-read branch May 6, 2020 23:31
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.

2 participants