Summary
EEVM.TestSupport.BlockchainHeaderValidator is consensus logic (parent linkage, number, timestamp, extra-data, gas-limit elasticity) that lives under test/support/ only because EEVM.Block.Header doesn't carry the fields it needs.
Scope
- Expand
EEVM.Block.Header with extra_data, gas_used, hash, and difficulty fields (and any other fields the validator needs).
- Move the validator to
lib/eevm/block/header_validator.ex, retyped against Block.Header.t() rather than the fixture struct.
- Update the BlockchainTest runner to construct a real
Block.Header from fixtures and call the lib-side validator.
Definition of Done
- Validator lives in
lib/.
- BlockchainTests still pass at the same coverage level.
- No remaining test-support shims for header fields.
Notes
Summary
EEVM.TestSupport.BlockchainHeaderValidatoris consensus logic (parent linkage, number, timestamp, extra-data, gas-limit elasticity) that lives undertest/support/only becauseEEVM.Block.Headerdoesn't carry the fields it needs.Scope
EEVM.Block.Headerwithextra_data,gas_used,hash, anddifficultyfields (and any other fields the validator needs).lib/eevm/block/header_validator.ex, retyped againstBlock.Header.t()rather than the fixture struct.Block.Headerfrom fixtures and call the lib-side validator.Definition of Done
lib/.Notes