Skip to content

Refactor: promote BlockchainHeaderValidator to lib/ #125

Description

@mw2000

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    block-processingBlock-level transaction processingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions