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

les, light: fix CHT trie retrievals #16039

Merged
merged 5 commits into from
Feb 11, 2018
Merged

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Feb 8, 2018

In my trie rework PR I blindly changed all the light server code to serve tries from our in-memory cache, instead of disk. This was overzealous, as I also rewrote serving CHT tries from the state trie memory database. This lead to light servers being unable to serve CHTs any more, and light clients thus starting to sync from block 0.

This PR fixes that by reverting to the previous behavior whereby CHTs are loaded directly from disk with the correct database prefixing.

@karalabe karalabe added this to the 1.8.0 milestone Feb 8, 2018
@karalabe karalabe requested a review from zsfelfoldi February 8, 2018 14:27
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

To quote the wise @karalabe:

Most importantly, why did all the tests pass and could we add one that repros this, seems to be a very nasty issue to leave untested

@karalabe
Copy link
Member Author

karalabe commented Feb 8, 2018

To quote the wise @karalabe:

Don't listen to him, has no clue what he's saying.

@karalabe
Copy link
Member Author

@holiman Added the tests for les1 / les2 CHT retrievals and les2 bloombits retrievals. PTAL

Copy link
Contributor

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe merged commit 7a0019c into ethereum:master Feb 11, 2018
prestonvanloon pushed a commit to prestonvanloon/go-ethereum that referenced this pull request Apr 2, 2018
* les, light: fix CHT trie retrievals

* les, light: minor polishes, test remote CHT retrievals

* les, light: deterministic nodeset rlp, bloombits test skeleton

* les: add an event emission to the les bloombits test

* les: drop dead tester code
mariameda pushed a commit to NiluPlatform/go-nilu that referenced this pull request Aug 23, 2018
* les, light: fix CHT trie retrievals

* les, light: minor polishes, test remote CHT retrievals

* les, light: deterministic nodeset rlp, bloombits test skeleton

* les: add an event emission to the les bloombits test

* les: drop dead tester code
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.

3 participants