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

Merkleise beacon chain blocks #40

Closed
JustinDrake opened this issue Oct 4, 2018 · 6 comments
Closed

Merkleise beacon chain blocks #40

JustinDrake opened this issue Oct 4, 2018 · 6 comments
Labels
general:enhancement New feature or request

Comments

@JustinDrake
Copy link
Contributor

Currently beacon chain blocks are hashed as monoliths. This is not friendly to light clients because beacon chain blocks could be quite large (as currently specced, attestations and specials are unbounded arrays of records).

My suggestion is to hash the individual fields in a BeaconChainBlock (of which there are 8) and then consider those as leaves of a Merkle tree. We then replace ancestor_hashes, oblique_parent_hashes, justified_block_hash, etc. with ancestor_roots, oblique_parent_roots, justified_block_root, etc.

@hwwhww hwwhww added the general:enhancement New feature or request label Oct 4, 2018
@vbuterin
Copy link
Contributor

vbuterin commented Oct 4, 2018

I'd personally prefer to hold off on making special-case decisions like that until we decide whether the special-case route is even the correct route in the first place. The alternative is that we create a general-purpose merkle-hashing algorithm for SImpleSerialize, and that way we get beacon chain blocks and the active and crystallized state.

@JustinDrake
Copy link
Contributor Author

For sure, (re)using the same logic as for state merkle-hashing is the way forward. (I'm just suggesting moving away from naive hashing for beacon blocks.)

@vbuterin
Copy link
Contributor

vbuterin commented Oct 4, 2018

Agree! And I'm suggesting doing what you want as part of a common general strategy for moving away from naive hashing for everything :)

@mkalinin
Copy link
Contributor

mkalinin commented Oct 5, 2018

It would be nice to make validator set a part of that strategy too.

@vbuterin
Copy link
Contributor

vbuterin commented Oct 9, 2018

#54

@JustinDrake
Copy link
Contributor Author

Closing in favour of #54 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants