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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! `OffenseType` — the four discrete slashable consensus offenses.
//!
//! Traces to: [SPEC.md §3.2](../../docs/resources/SPEC.md), catalogue row
//! [DSL-001](../../docs/requirements/domains/evidence/specs/DSL-001.md).
//!
//! Scope reminder: validator slashing only. DFSP / storage-provider slashing
//! is out of scope for this crate.
//!
//! # Design
//!
//! Four variants, three BPS floors (both attester variants share
//! `ATTESTATION_BASE_BPS`). The variant-to-BPS mapping is protocol law — it
//! lives in `base_penalty_bps()` and nowhere else in the codebase. Downstream
//! callers (the base-slash formula in `SlashingManager::submit_evidence`,
//! DSL-022; the reporter-penalty path in `AppealAdjudicator`, DSL-069) query
//! this method rather than hard-coding the BPS values.
//!
//! Serde + `Copy` + `Eq` + `Hash` derives keep the enum cheap to pass by
//! value through every downstream type (`SlashingEvidence`, `VerifiedEvidence`,
//! `AppealAdjudicationResult`).
use ;
use crate;
/// The four slashable consensus offenses.
///
/// Per [SPEC §3.2](../../docs/resources/SPEC.md), a validator can be slashed
/// for exactly one of these reasons on the DIG L2 blockchain. Inactivity
/// leak is NOT a slashable event — it is continuous accounting
/// (see `InactivityScoreTracker`, SPEC §9).