battlmonstr 490a90b328 VerifyStage: headers validation using preferified hashes. (#27)
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.
2021-09-16 20:22:06 +02:00
2021-09-16 17:15:07 +03:00
2021-05-30 12:44:19 +02:00
2021-09-15 19:12:01 +03:00
2021-01-06 03:38:15 +03:00
2021-04-10 18:05:31 +03:00
2021-05-29 22:53:30 +03:00

Akula

Ethereum client written in Rust, based on turbo-geth client architecture.

Requires nightly Rust.

Description
No description provided
Readme AGPL-3.0 11 MiB
Languages
Rust 99.9%