feat(primitives): move header validation methods from consensus to primitive #9207
Labels
C-enhancement
New feature or request
S-needs-triage
This issue needs to be labelled
S-stale
This issue/PR is stale and will close with no further activity
Describe the feature
At the moment, in this file:
https://github.com/paradigmxyz/reth/blob/2a9fa4869e658ca89e050d0d985a7ccbfa360bfa/crates/consensus/common/src/validation.rs
we have a lot of header validation methods like this one:
reth/crates/consensus/common/src/validation.rs
Lines 14 to 24 in 2a9fa48
I have the impression that rather than keeping these methods here, it would make more sense to integrate them into the
SealedHeader
implementation with a specific error typeHeaderConsensusError
which would group together all possible errors when validating the sealed headers and which would then be passed transparently to theConsensusError
.This would make it possible to make the implementation more structural and to use:
for example.
Additional context
No response
The text was updated successfully, but these errors were encountered: