1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! `InvalidBlockProof` — per-offense payload for `OffenseType::InvalidBlock`.
//!
//! Traces to: [SPEC.md §3.4](../../docs/resources/SPEC.md), catalogue row
//! [DSL-008](../../docs/requirements/domains/evidence/specs/DSL-008.md).
//!
//! # Role
//!
//! Carries everything needed to prove a proposer signed a block that
//! fails canonical validation:
//!
//! - [`SignedBlockHeader`](super::proposer_slashing::SignedBlockHeader)
//! — the block header + BLS signature (DSL-009).
//! - `failure_witness` — caller-supplied bytes that the
//! [`InvalidBlockOracle`](../../traits.rs) (DSL-020) replays to
//! reproduce the validation failure. Size depends on the failure
//! reason; `serde_bytes` keeps the binary-format encoding compact.
//! - [`InvalidBlockReason`] — categorical tag. Eight variants covering
//! the distinct canonical-validation failure modes.
//!
//! # Downstream
//!
//! - `verify_invalid_block` (DSL-018..020) consumes all three fields.
//! - Appeal ground `InvalidBlockAppealGround::FailureReasonMismatch`
//! (DSL-051) checks oracle-reported reason against the claimed
//! `failure_reason`.
use ;
use crateSignedBlockHeader;
/// Canonical reason categories for `InvalidBlockProof::failure_reason`.
///
/// Per [SPEC §3.4](../../docs/resources/SPEC.md). Adding a new variant
/// is a protocol-version bump — downstream pattern-matches assume
/// exhaustive coverage of exactly these eight cases (see
/// `test_dsl_008_all_reasons_enumerated`).
///
/// The enum is `Copy` + `Hash` because it's a lightweight discriminant
/// that shows up in `AppealAdjudicationResult`, oracle return values,
/// and metrics labels — passing by value is cheap and avoids `.clone()`
/// noise in consumers.
/// Evidence that a proposer signed an invalid block.
///
/// Per [SPEC §3.4](../../docs/resources/SPEC.md). Passive wire carrier:
/// no validation happens at construction, only at
/// `verify_invalid_block` (DSL-018..020).