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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//! `SlashingSystem` genesis bootstrap.
//!
//! Traces to: [SPEC §11](../docs/resources/SPEC.md).
//!
//! # Role
//!
//! Bundles the three long-lived state trackers
//! (`SlashingManager`, `ParticipationTracker`,
//! `InactivityScoreTracker`) into one aggregate that the
//! embedder can construct via [`SlashingSystem::genesis`] at
//! chain birth and step forward via [`crate::run_epoch_boundary`]
//! at every epoch boundary.
//!
//! The three sub-components are independently useful (tests in
//! earlier phases construct them directly), so this aggregate is
//! intentionally a thin wrapper — it owns zero logic beyond the
//! constructor.
use Bytes32;
use crateInactivityScoreTracker;
use crateSlashingManager;
use crateParticipationTracker;
/// Parameters required at chain genesis to initialise the
/// slashing system.
///
/// `network_id` is carried for future domain-separation /
/// signature-binding work (currently unused by `genesis` itself
/// but required by embedders who persist the aggregate across
/// chain forks).
/// Aggregate of the three long-lived slashing-state trackers
/// an embedder carries across blocks.
///
/// Each field is independently exported by the crate; the
/// aggregate exists only to give embedders a single struct to
/// serialise / snapshot / pass into `run_epoch_boundary`.
///
/// # `network_id`
///
/// Stored privately under DSL-170. The accessor
/// [`SlashingSystem::network_id`] returns a borrow. Consumed by
/// downstream admission flows (DSL-168
/// `process_block_admissions`) that need domain-separated
/// signature verification without requiring every embedder call
/// site to thread `network_id` through its arg list.