mirror of
https://github.com/akula-bft/akula.git
synced 2026-04-19 03:00:13 -04:00
490a90b32844fe7c0abafe8d687e1137acb2e538
The preverified hashes is a list of known precomputed hashes of every 192-th block in the chain: hash(0), hash(192), hash(384), hash(576), ... The preverified hashes are copied from: https://github.com/ledgerwatch/erigon/blob/devel/turbo/stages/headerdownload/preverified_hashes_mainnet.go https://github.com/ledgerwatch/erigon/blob/devel/turbo/stages/headerdownload/preverified_hashes_ropsten.go When we have a HeaderSlice and need to verify it, the algorithm verifies that the top of the slice matches one of the preverified hashes, and that all blocks down to the root of the slice are properly connected by the parent_hash field. For example, if we have a HeaderSlice[192...384] (with block headers from 192 to 384 inclusive), it verifies that: hash(slice[384]) == preverified hash(384) hash(slice[383]) == slice[384].parent_hash hash(slice[382]) == slice[383].parent_hash ... hash(slice[192]) == slice[193].parent_hash Thus verifying hashes of all the headers.
Akula
Ethereum client written in Rust, based on turbo-geth client architecture.
Requires nightly Rust.
Languages
Rust
99.9%