-
Notifications
You must be signed in to change notification settings - Fork 975
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
Historical block/state roots #2428
Closed
Closed
Commits on May 20, 2021
-
This PR simplifies and replaces `historical_roots` with `historical_block_roots`. By keeping an accumulator of historical block roots in the state, it becomes possible to validate the entire block history that led up to a particular state without executing the transitions. This is interesting for archival purposes as well as when implementing sync protocols that can then proceed to verify chunks of blocks quickly - it's also useful as it provides a canonical hash by which such chunks of blocks can be named, with a direct reference in the state. In order not to grow the state size further, the `historical_roots` field is removed - the blocks already contain state roots, so the value of repeating the state root in the historical accumulator is limited to empty slots, and even then, the historical block root accumulator differentiates states that differ by empty slots. This is a sketch of the full PR - there are a few key decisions to make: * should the historical block roots be backfilled with phase0 data on the transition? This simplifies future logic but could be omitted for simplicity. It's easy to precalculate what the values should be, so it's not a computational issue. * should historical roots remain? As far as naming goes, it's convenient to talk about an "era" being 8192 epoch = 256k slots ~= 36.4 days.
Configuration menu - View commit details
-
Copy full SHA for 658e92a - Browse repository at this point
Copy the full SHA 658e92aView commit details
Commits on May 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ce928cd - Browse repository at this point
Copy the full SHA ce928cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d711a79 - Browse repository at this point
Copy the full SHA d711a79View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf23f92 - Browse repository at this point
Copy the full SHA bf23f92View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ff34c - Browse repository at this point
Copy the full SHA a3ff34cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7854b27 - Browse repository at this point
Copy the full SHA 7854b27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b20da3 - Browse repository at this point
Copy the full SHA 6b20da3View commit details -
* enables proving the state for empty slots * allows verifying the backfilled fields against the previous `historical_roots` field * allows trivially computing `historical_roots`, for any existing use cases
Configuration menu - View commit details
-
Copy full SHA for 96dc7f6 - Browse repository at this point
Copy the full SHA 96dc7f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ea0b90 - Browse repository at this point
Copy the full SHA 3ea0b90View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1b46e2 - Browse repository at this point
Copy the full SHA d1b46e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67012a2 - Browse repository at this point
Copy the full SHA 67012a2View commit details
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.