-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Block Header Structure with Consensus Verification Support #24
Copy link
Copy link
Open
Description
Description
The Architecture.md specifies the need for light sync to verify canonical chain without full blocks. While tests demonstrate block header encoding/decoding patterns, there is no formal BlockHeader structure or consensus verification utilities. Per Issue #2, this is essential for validating cross-chain messages using RLP-encoded state proofs.
Required for:
- Light client header chain synchronization
- Parent hash chain verification
- Block header validation for each chain (Ethereum PoS, Polygon, BSC PoSA)
Acceptance Criteria
- Create
BlockHeaderstruct with all 15+ header fields (parentHash, uncleHash, coinbase, stateRoot, etc.) - Implement
encodeBlockHeader(RlpEncoder&, const BlockHeader&)free function - Implement
decodeBlockHeader(RlpDecoder&, BlockHeader&)free function - Implement
computeBlockHash(const BlockHeader&) -> Hash256utility - Implement
verifyParentChain(span<const BlockHeader>)for chain consistency - Add chain-specific verification hooks (extensible for PoS, PoSA)
- Add unit tests with real Ethereum mainnet block headers
- Place in
rlp_ethereum.hppor newrlp_ethereum_blocks.hpp
Priority
High
Related Requirements
- CLAUDE.md: Const-correctness - All parameter structs passed by const&
- CLAUDE.md: Named initialization - Structs designed for designated initializers
- Issue EVM Bridging Messaging System #2: Bridge Message Processing - Validates cross-chain messages using RLP-encoded state proofs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels