pub trait InvalidBlockOracle {
// Required method
fn re_execute(
&self,
header: &L2BlockHeader,
witness: &[u8],
) -> Result<ExecutionOutcome, SlashingError>;
// Provided method
fn verify_failure(
&self,
_header: &L2BlockHeader,
_witness: &[u8],
_reason: InvalidBlockReason,
) -> Result<(), SlashingError> { ... }
}Expand description
Full-node block re-execution hook.
Traces to SPEC §15.3, catalogue rows DSL-020
- DSL-049 + [DSL-145].
§Role
verify_invalid_block(DSL-020) callsverify_failurewhen the caller supplied an oracle; absence means bootstrap mode (the evidence is admitted and defers to the challenge window).InvalidBlockAppeal::BlockActuallyValid(DSL-049) callsre_executeto adjudicate whether the accused block really is invalid.
§Default verify_failure
The default body is Ok(()) — bootstrap mode where every
well-signed evidence envelope is admitted. Real full-node impls
override to re-execute the block and cross-check the claimed
failure reason.
§Determinism
re_execute MUST be deterministic — same inputs → same outcome
(DSL-145). Non-determinism here would let the same block flip
between “valid” and “invalid” across honest nodes, breaking
evidence consensus.
Required Methods§
Sourcefn re_execute(
&self,
header: &L2BlockHeader,
witness: &[u8],
) -> Result<ExecutionOutcome, SlashingError>
fn re_execute( &self, header: &L2BlockHeader, witness: &[u8], ) -> Result<ExecutionOutcome, SlashingError>
Re-execute the block deterministically. Returns whether it is Valid or Invalid (with the specific reason when invalid).
Provided Methods§
Sourcefn verify_failure(
&self,
_header: &L2BlockHeader,
_witness: &[u8],
_reason: InvalidBlockReason,
) -> Result<(), SlashingError>
fn verify_failure( &self, _header: &L2BlockHeader, _witness: &[u8], _reason: InvalidBlockReason, ) -> Result<(), SlashingError>
Verify the caller’s claim that header is invalid for the
stated reason, using witness bytes (trie proofs, state
diff, etc.).
Default: accept — bootstrap path. Full nodes override.