Skip to main content

dig_slashing/appeal/
mod.rs

1//! Appeal-domain types + verifiers.
2//!
3//! Traces to: [SPEC.md §3.6 + §6](../../docs/resources/SPEC.md),
4//! catalogue rows [DSL-034..073 + DSL-159..164](../../docs/requirements/domains/appeal/specs/).
5//!
6//! # Role
7//!
8//! Optimistic slashing is reversible during the 8-epoch appeal window.
9//! This module owns the three appeal payload shapes
10//! ([`ProposerSlashingAppeal`], [`AttesterSlashingAppeal`],
11//! [`InvalidBlockAppeal`]), the [`SlashAppeal`] envelope, and the
12//! per-ground verifiers that produce an [`AppealVerdict`].
13//!
14//! # Scope (incremental)
15//!
16//! Module grows one DSL at a time. First commit lands DSL-034
17//! (ProposerAppeal HeadersIdentical). Sibling grounds + the
18//! dispatcher + adjudicator come in subsequent commits.
19
20pub mod adjudicator;
21pub mod envelope;
22pub mod ground;
23pub mod verdict;
24pub mod verify;
25
26pub use adjudicator::{
27    AppealAdjudicationResult, BondSplitResult, ClawbackResult, ReporterPenalty,
28    ShortfallAbsorption, adjudicate_absorb_clawback_shortfall, adjudicate_appeal,
29    adjudicate_rejected_challenge_open, adjudicate_rejected_forfeit_appellant_bond,
30    adjudicate_sustained_clawback_rewards, adjudicate_sustained_forfeit_reporter_bond,
31    adjudicate_sustained_reporter_penalty, adjudicate_sustained_restore_status,
32    adjudicate_sustained_revert_base_slash, adjudicate_sustained_revert_collateral,
33    adjudicate_sustained_status_reverted,
34};
35
36pub use envelope::{SlashAppeal, SlashAppealPayload};
37pub use ground::{
38    AttesterAppealGround, AttesterSlashingAppeal, InvalidBlockAppeal, InvalidBlockAppealGround,
39    ProposerAppealGround, ProposerSlashingAppeal,
40};
41pub use verdict::{AppealRejectReason, AppealSustainReason, AppealVerdict};
42pub use verify::{
43    verify_attester_appeal_attestations_identical, verify_attester_appeal_empty_intersection,
44    verify_attester_appeal_invalid_indexed_attestation_structure,
45    verify_attester_appeal_not_slashable_by_predicate, verify_attester_appeal_signature_a_invalid,
46    verify_attester_appeal_signature_b_invalid,
47    verify_attester_appeal_validator_not_in_intersection,
48    verify_invalid_block_appeal_block_actually_valid,
49    verify_invalid_block_appeal_evidence_epoch_mismatch,
50    verify_invalid_block_appeal_failure_reason_mismatch,
51    verify_invalid_block_appeal_proposer_signature_invalid,
52    verify_proposer_appeal_headers_identical, verify_proposer_appeal_proposer_index_mismatch,
53    verify_proposer_appeal_signature_a_invalid, verify_proposer_appeal_signature_b_invalid,
54    verify_proposer_appeal_slot_mismatch, verify_proposer_appeal_validator_not_active_at_epoch,
55};