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

Determine how to efficiently index Beacon State with proof #77

Closed
dboreham opened this issue Sep 14, 2022 · 2 comments
Closed

Determine how to efficiently index Beacon State with proof #77

dboreham opened this issue Sep 14, 2022 · 2 comments
Assignees

Comments

@dboreham
Copy link

Beacon state is a 60MB structured record that significantly changes every slot (12 seconds). If we want to represent this historical state in a hash-linked form, similar to our approach with ipld-eth, we need to be able to split the SSZ tree into changed and non-changed components that have their own hashes, then store the resulting pieces in a way that allows them to be found for a given block height, and also stitched together again to make a whole Beacon State record.

@dboreham dboreham self-assigned this Sep 14, 2022
@i-norden
Copy link
Contributor

i-norden commented Oct 27, 2022

Difference iteration statediffing approach (analogous to what we do in the execution layer):

  1. Materialize SSZ serialized beacon states at n and n-1 into SSZ Merkle trees
  2. Perform difference iteration of the two trees to collect only the nodes which form the symmetric difference set between the two trees
  3. Index the individual nodes in the difference set

@telackey
Copy link
Contributor

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

No branches or pull requests

3 participants