go-ethereum/consensus/bor
Manav Darji adad83d6ac
consensus/bor: add span store abstraction for stateless verification (#1472)
Add a new abstraction called span store in bor consensus. This makes the header verification stateless as instead of fetching validator set (of a span) from genesis contract, we rely on span from heimdall itself for validator set. This doesn't change any assumptions for consensus as the data in genesis contracts is written by fetching span details from heimdall in the first place. 

This helps us with multiple things such as header verification for snap sync, validating producer set against header's extra data, and using heimdall as a source of truth instead of making a contract call to genesis contract which generally leads to issues when importing side chains (as we need to use the side chain state and not canonical). 

Span store is a minimal cache which maintains last 10 spans in memory. It provide simple read methods via span id and block number so that we can use it in consensus.
2025-05-07 21:34:12 +05:30
..
abi unit tests on new functions 2025-01-27 04:37:37 -03:00
api consensus/bor: use CallWithState to fetch last state id (#1323) 2024-09-05 21:11:44 +05:30
clerk Prepare Bor package for testing (#416) 2022-06-08 16:39:30 +03:00
contract consensus/bor: use CallWithState to fetch last state id (#1323) 2024-09-05 21:11:44 +05:30
heimdall fix edge case on ticker 2025-02-25 16:51:27 -03:00
heimdallapp eth, consensus: refactor whitelisting related logs and improve error handling (#1268) 2024-06-18 14:43:51 +05:30
heimdallgrpc fix: lint, add: milestone related tests in downloader 2024-09-05 14:03:10 +05:30
statefull Merge tag 'v1.14.10' into lmartins/upstream_merge_v1.14.10 2025-02-04 07:41:07 -03:00
valset check empty ids before querying validator set contract 2025-01-27 09:13:35 -03:00
api.go Enable ancient block pruning (#1216) 2024-05-09 11:19:34 +05:30
bor.go consensus/bor: add span store abstraction for stateless verification (#1472) 2025-05-07 21:34:12 +05:30
bor_test.go Merge tag 'v1.14.10' into lmartins/upstream_merge_v1.14.10 2025-02-04 07:41:07 -03:00
errors.go Prepare Bor package for testing (#416) 2022-06-08 16:39:30 +03:00
genesis.go Implement PIP-12, Time Based StateSync Confirmations Delay (#864) 2023-06-06 20:40:46 +05:30
genesis_contract_mock.go consensus/bor,eth/filters,miner,params,tests: fix mocks 2023-07-12 15:17:58 +08:00
heimdall.go fix mocks generation and remove reflection 2025-03-26 15:18:43 +01:00
merkle.go Reciept e2e test (#431) 2022-07-14 19:28:56 +03:00
snapshot.go consensus/bor: add span store abstraction for stateless verification (#1472) 2025-05-07 21:34:12 +05:30
snapshot_test.go Bump dependencies (#1183) 2024-03-12 13:29:40 +01:00
span.go Merge qa to develop (#814) 2023-04-10 16:21:18 +05:30
span_mock.go consensus/bor,eth/filters,miner,params,tests: fix mocks 2023-07-12 15:17:58 +08:00
span_store.go consensus/bor: add span store abstraction for stateless verification (#1472) 2025-05-07 21:34:12 +05:30
span_store_test.go consensus/bor: add span store abstraction for stateless verification (#1472) 2025-05-07 21:34:12 +05:30