Historic Block Proof
Since Clients usually have the public keys of the last sync period and are able to verify blocks, verifying a ollder block gets complicated, because you would need the public keys of the sync committee at that period, which ar hardly available. In order to allow the verification of those historic blocks, we can use the the historic summaries of the current state.
take the blockroot to verify and together with the all the 8192 blockroots of that period and cretae a merkle proof for this list.
using the current state, we get the list of all historic summaries holding the summar block_rooots of those lists and continue the merkle proof to the tree root hash of thid list.
we then continue the merkle proof fomr the has tree root of the historic_summaries down to the state_root.
with the blockheader of the current block associated with this state and mathching the state_root with the root of the merkler proof, we add the BLS-Signature of the sync_committee which can be easily verified by the client.
Building the historic proof
In order to build a historic proof, we need data, which can not be provided directly by the standard beacon api. At the time of writing, only lodestar offers an endpoint providing the merkle proof and the the full list of historical summaries at /eth/v1/lodestar/states/{state_id}/historical_summaries. For the blockroots itself, of course you get each single blockroot for all 8192 blocks of the period so you can build the merkle proof with a lot of requests to the header-endpoint, but this would take very long, so fetching them all and caching all blockroots allows to build them fast and efficient. Those blockroots are then stored in the chain_store under data/{chain_id}/{period}/blocks.ssz
. When starting the proofer with the -d option, it will use the fetched data.
EthHistoricBlockProof
a proof using the historic summaries
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
class EthHistoricBlockProof(Container):
proof : List [bytes32, 128] # merkle proof from thr blotroot over the historic_summaries to the state
header : BeaconBlockHeader # the header of the beacon block containing historic_summaries (usually close to head)
gindex : Uint64 # the combined gindex of the proof
Referenced Types
ProofHeader
a header without the parentRoot used for the header proof
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
class ProofHeader(Container):
slot : Uint64 # the slot of the block or blocknumber
proposerIndex : Uint64 # the index of the validator proposing the block
stateRoot : Bytes32 # the hash_tree_root of the state at the end of the block
bodyRoot : Bytes32 # the hash_tree_root of the block body
EthHeadersBlockProof
Header proof is a proof, using a list of following headers to verify a block in the past with a later header holding a signature.
The Type is defined in src/chains/eth/ssz/verify_proof_types.h.
class EthHeadersBlockProof(Container):
headers : List [ProofHeader, 128] # list of headers
header : BeaconBlockHeader # the header of the beacon block containing the signature
Referenced Types
Last updated