dig-slashing 0.1.0

Validator slashing, attestation participation, inactivity accounting, and fraud-proof appeals for the DIG Network L2 blockchain.
Documentation
//! Appeal-domain types + verifiers.
//!
//! Traces to: [SPEC.md §3.6 + §6](../../docs/resources/SPEC.md),
//! catalogue rows [DSL-034..073 + DSL-159..164](../../docs/requirements/domains/appeal/specs/).
//!
//! # Role
//!
//! Optimistic slashing is reversible during the 8-epoch appeal window.
//! This module owns the three appeal payload shapes
//! ([`ProposerSlashingAppeal`], [`AttesterSlashingAppeal`],
//! [`InvalidBlockAppeal`]), the [`SlashAppeal`] envelope, and the
//! per-ground verifiers that produce an [`AppealVerdict`].
//!
//! # Scope (incremental)
//!
//! Module grows one DSL at a time. First commit lands DSL-034
//! (ProposerAppeal HeadersIdentical). Sibling grounds + the
//! dispatcher + adjudicator come in subsequent commits.

pub mod adjudicator;
pub mod envelope;
pub mod ground;
pub mod verdict;
pub mod verify;

pub use adjudicator::{
    AppealAdjudicationResult, BondSplitResult, ClawbackResult, ReporterPenalty,
    ShortfallAbsorption, adjudicate_absorb_clawback_shortfall, adjudicate_appeal,
    adjudicate_rejected_challenge_open, adjudicate_rejected_forfeit_appellant_bond,
    adjudicate_sustained_clawback_rewards, adjudicate_sustained_forfeit_reporter_bond,
    adjudicate_sustained_reporter_penalty, adjudicate_sustained_restore_status,
    adjudicate_sustained_revert_base_slash, adjudicate_sustained_revert_collateral,
    adjudicate_sustained_status_reverted,
};

pub use envelope::{SlashAppeal, SlashAppealPayload};
pub use ground::{
    AttesterAppealGround, AttesterSlashingAppeal, InvalidBlockAppeal, InvalidBlockAppealGround,
    ProposerAppealGround, ProposerSlashingAppeal,
};
pub use verdict::{AppealRejectReason, AppealSustainReason, AppealVerdict};
pub use verify::{
    verify_attester_appeal_attestations_identical, verify_attester_appeal_empty_intersection,
    verify_attester_appeal_invalid_indexed_attestation_structure,
    verify_attester_appeal_not_slashable_by_predicate, verify_attester_appeal_signature_a_invalid,
    verify_attester_appeal_signature_b_invalid,
    verify_attester_appeal_validator_not_in_intersection,
    verify_invalid_block_appeal_block_actually_valid,
    verify_invalid_block_appeal_evidence_epoch_mismatch,
    verify_invalid_block_appeal_failure_reason_mismatch,
    verify_invalid_block_appeal_proposer_signature_invalid,
    verify_proposer_appeal_headers_identical, verify_proposer_appeal_proposer_index_mismatch,
    verify_proposer_appeal_signature_a_invalid, verify_proposer_appeal_signature_b_invalid,
    verify_proposer_appeal_slot_mismatch, verify_proposer_appeal_validator_not_active_at_epoch,
};