-
Notifications
You must be signed in to change notification settings - Fork 998
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
Phase 1: block headers inside or outside of data committed to in the shard data root? #338
Comments
I'm a bit confused about the construction of the 5 data roots. |
Let |
Notes from a discussion with @JustinDrake:
|
I see two paths for exactly what data the shard data roots that are attested to in crosslinks commit to. Note that each choice also influences the choice of what clients will need to check to gain assurance of validity and availability.
Proofs of custody on data roots only
Suppose the last crosslink for shard
i
was of a block at slotN
, and the next crosslink is of a block at slotN+k
. The crosslink commits to a merkle root of the data roots of each block in the range[N ... N+k-1]
, where skipped slots are deemed as containing empty data.To verify a chain, a client must:
The main weakness of the scheme is higher overhead for clients wishing to fully verify: you need to be a light client on every shard, so that's ~400 bytes * 1024 shards / 6 seconds = 67 kB/sec.
Proofs of custody on shard chains
Instead of one 16-kb data root, each shard block has 5 data roots for 15.5 kb of data, leaving the other 512 bytes empty. You can then calculate the "real data root" of a block as being the Merkle root of the 512 byte space including the header concatenated with the 15.5 kb of the data (the header itself and the 5 data roots suffice for this).
The crosslink commits to a merkle root of these data roots.
To fully verify a chain, a client must now only verify the beacon chain, and do data availability checks on the erasure coded data of the crosslink roots if desired. Verifying the validity of the shard chain can now be done entirely with slashing conditions, where you can declare a data root invalid by providing a Merkle branch into a block, verifying the block in-beacon-chain and showing that the block is invalid (or providing two adjacent blocks to show that their hashes mismatch).
The main weaknesses of the scheme are:
The text was updated successfully, but these errors were encountered: