Expand description
§dig-slashing
Validator slashing, attestation participation accounting, inactivity accounting, and fraud-proof appeal system for the DIG Network L2 blockchain.
Traces to: SPEC.md v0.4+.
§Scope
Validator slashing only. Four discrete offenses (ProposerEquivocation,
InvalidBlock, AttesterDoubleVote, AttesterSurroundVote). Continuous
inactivity accounting (Ethereum Bellatrix parity). Optimistic slashing
lifecycle with 8-epoch fraud-proof appeal window.
DFSP / storage-provider slashing is out of scope — different subsystem, different future crate.
§Re-exports
The crate root re-exports every public type and constant named in any
DSL-NNN requirement. Downstream consumers should import from here,
not from individual modules, to keep dependency edges clean.
§Module layout
constants— protocol constants (BPS, quotients, domain tags)evidence— offense types, evidence envelopes, verifiers
(Further modules land as their DSL-NNN requirements are implemented.)
Re-exports§
pub use appeal::AppealAdjudicationResult;pub use appeal::AppealRejectReason;pub use appeal::AppealSustainReason;pub use appeal::AppealVerdict;pub use appeal::AttesterAppealGround;pub use appeal::AttesterSlashingAppeal;pub use appeal::BondSplitResult;pub use appeal::ClawbackResult;pub use appeal::InvalidBlockAppeal;pub use appeal::InvalidBlockAppealGround;pub use appeal::ProposerAppealGround;pub use appeal::ProposerSlashingAppeal;pub use appeal::ReporterPenalty;pub use appeal::ShortfallAbsorption;pub use appeal::SlashAppeal;pub use appeal::SlashAppealPayload;pub use appeal::adjudicate_absorb_clawback_shortfall;pub use appeal::adjudicate_appeal;pub use appeal::adjudicate_rejected_challenge_open;pub use appeal::adjudicate_rejected_forfeit_appellant_bond;pub use appeal::adjudicate_sustained_clawback_rewards;pub use appeal::adjudicate_sustained_forfeit_reporter_bond;pub use appeal::adjudicate_sustained_reporter_penalty;pub use appeal::adjudicate_sustained_restore_status;pub use appeal::adjudicate_sustained_revert_base_slash;pub use appeal::adjudicate_sustained_revert_collateral;pub use appeal::adjudicate_sustained_status_reverted;pub use appeal::verify_attester_appeal_attestations_identical;pub use appeal::verify_attester_appeal_empty_intersection;pub use appeal::verify_attester_appeal_invalid_indexed_attestation_structure;pub use appeal::verify_attester_appeal_not_slashable_by_predicate;pub use appeal::verify_attester_appeal_signature_a_invalid;pub use appeal::verify_attester_appeal_signature_b_invalid;pub use appeal::verify_attester_appeal_validator_not_in_intersection;pub use appeal::verify_invalid_block_appeal_block_actually_valid;pub use appeal::verify_invalid_block_appeal_evidence_epoch_mismatch;pub use appeal::verify_invalid_block_appeal_failure_reason_mismatch;pub use appeal::verify_invalid_block_appeal_proposer_signature_invalid;pub use appeal::verify_proposer_appeal_headers_identical;pub use appeal::verify_proposer_appeal_proposer_index_mismatch;pub use appeal::verify_proposer_appeal_signature_a_invalid;pub use appeal::verify_proposer_appeal_signature_b_invalid;pub use appeal::verify_proposer_appeal_slot_mismatch;pub use appeal::verify_proposer_appeal_validator_not_active_at_epoch;pub use bonds::BondError;pub use bonds::BondEscrow;pub use bonds::BondTag;pub use constants::APPELLANT_BOND_MOJOS;pub use constants::ATTESTATION_BASE_BPS;pub use constants::BASE_REWARD_FACTOR;pub use constants::BLS_PUBLIC_KEY_SIZE;pub use constants::BLS_SIGNATURE_SIZE;pub use constants::BOND_AWARD_TO_WINNER_BPS;pub use constants::BPS_DENOMINATOR;pub use constants::DOMAIN_BEACON_ATTESTER;pub use constants::DOMAIN_BEACON_PROPOSER;pub use constants::DOMAIN_SLASH_APPEAL;pub use constants::DOMAIN_SLASHING_EVIDENCE;pub use constants::EQUIVOCATION_BASE_BPS;pub use constants::INACTIVITY_PENALTY_QUOTIENT;pub use constants::INACTIVITY_SCORE_BIAS;pub use constants::INACTIVITY_SCORE_RECOVERY_RATE;pub use constants::INVALID_BLOCK_BASE_BPS;pub use constants::MAX_APPEAL_ATTEMPTS_PER_SLASH;pub use constants::MAX_APPEAL_PAYLOAD_BYTES;pub use constants::MAX_APPEALS_PER_BLOCK;pub use constants::MAX_PENALTY_BPS;pub use constants::MAX_PENDING_SLASHES;pub use constants::MAX_SLASH_PROPOSAL_PAYLOAD_BYTES;pub use constants::MAX_SLASH_PROPOSALS_PER_BLOCK;pub use constants::MAX_VALIDATORS_PER_COMMITTEE;pub use constants::MIN_ATTESTATION_INCLUSION_DELAY;pub use constants::MIN_EFFECTIVE_BALANCE;pub use constants::MIN_EPOCHS_TO_INACTIVITY_PENALTY;pub use constants::MIN_SLASHING_PENALTY_QUOTIENT;pub use constants::PROPORTIONAL_SLASHING_MULTIPLIER;pub use constants::PROPOSER_REWARD_QUOTIENT;pub use constants::PROPOSER_WEIGHT;pub use constants::REPORTER_BOND_MOJOS;pub use constants::SLASH_APPEAL_REMARK_MAGIC_V1;pub use constants::SLASH_APPEAL_WINDOW_EPOCHS;pub use constants::SLASH_EVIDENCE_REMARK_MAGIC_V1;pub use constants::SLASH_LOCK_EPOCHS;pub use constants::TIMELY_HEAD_FLAG_INDEX;pub use constants::TIMELY_HEAD_WEIGHT;pub use constants::TIMELY_SOURCE_FLAG_INDEX;pub use constants::TIMELY_SOURCE_MAX_DELAY_SLOTS;pub use constants::TIMELY_SOURCE_WEIGHT;pub use constants::TIMELY_TARGET_FLAG_INDEX;pub use constants::TIMELY_TARGET_MAX_DELAY_SLOTS;pub use constants::TIMELY_TARGET_WEIGHT;pub use constants::WEIGHT_DENOMINATOR;pub use constants::WHISTLEBLOWER_REWARD_QUOTIENT;pub use error::SlashingError;pub use evidence::AttestationData;pub use evidence::AttesterSlashing;pub use evidence::Checkpoint;pub use evidence::IndexedAttestation;pub use evidence::InvalidBlockProof;pub use evidence::InvalidBlockReason;pub use evidence::OffenseType;pub use evidence::ProposerSlashing;pub use evidence::SignedBlockHeader;pub use evidence::SlashingEvidence;pub use evidence::SlashingEvidencePayload;pub use evidence::VerifiedEvidence;pub use evidence::block_signing_message;pub use evidence::verify_attester_slashing;pub use evidence::verify_evidence;pub use evidence::verify_evidence_for_inclusion;pub use evidence::verify_invalid_block;pub use evidence::verify_proposer_slashing;pub use inactivity::InactivityScoreTracker;pub use inactivity::in_finality_stall;pub use manager::FinalisationResult;pub use manager::PerValidatorSlash;pub use manager::SlashingManager;pub use manager::SlashingResult;pub use orchestration::EpochBoundaryReport;pub use orchestration::JustificationView;pub use orchestration::ReorgReport;pub use orchestration::rewind_all_on_reorg;pub use orchestration::run_epoch_boundary;pub use participation::FlagDelta;pub use participation::ParticipationError;pub use participation::ParticipationFlags;pub use participation::ParticipationTracker;pub use participation::base_reward;pub use participation::classify_timeliness;pub use participation::compute_flag_deltas;pub use participation::proposer_inclusion_reward;pub use pending::AppealAttempt;pub use pending::AppealOutcome;pub use pending::PendingSlash;pub use pending::PendingSlashBook;pub use pending::PendingSlashStatus;pub use protection::SlashingProtection;pub use remark::BlockAdmissionReport;pub use remark::encode_slash_appeal_remark_payload_v1;pub use remark::encode_slashing_evidence_remark_payload_v1;pub use remark::enforce_block_level_appeal_caps;pub use remark::enforce_block_level_slashing_caps;pub use remark::enforce_slash_appeal_mempool_dedup_policy;pub use remark::enforce_slash_appeal_mempool_policy;pub use remark::enforce_slash_appeal_payload_cap;pub use remark::enforce_slash_appeal_remark_admission;pub use remark::enforce_slash_appeal_terminal_status_policy;pub use remark::enforce_slash_appeal_variant_policy;pub use remark::enforce_slash_appeal_window_policy;pub use remark::enforce_slashing_evidence_mempool_dedup_policy;pub use remark::enforce_slashing_evidence_mempool_policy;pub use remark::enforce_slashing_evidence_payload_cap;pub use remark::enforce_slashing_evidence_remark_admission;pub use remark::parse_slash_appeals_from_conditions;pub use remark::parse_slashing_evidence_from_conditions;pub use remark::process_block_admissions;pub use remark::slash_appeal_remark_puzzle_hash_v1;pub use remark::slash_appeal_remark_puzzle_reveal_v1;pub use remark::slashing_evidence_remark_puzzle_hash_v1;pub use remark::slashing_evidence_remark_puzzle_reveal_v1;pub use system::GenesisParameters;pub use system::SlashingSystem;pub use traits::CollateralError;pub use traits::CollateralSlasher;pub use traits::EffectiveBalanceView;pub use traits::ExecutionOutcome;pub use traits::InvalidBlockOracle;pub use traits::ProposerView;pub use traits::PublicKeyLookup;pub use traits::RewardClawback;pub use traits::RewardPayout;pub use traits::ValidatorEntry;pub use traits::ValidatorView;
Modules§
- appeal
- Appeal-domain types + verifiers.
- bonds
- Bond-escrow surface: tag enum, error enum, and
BondEscrowtrait. - constants
- Protocol constants for dig-slashing.
- error
- Error types for the slashing crate.
- evidence
- Evidence-domain types + verification.
- inactivity
- Continuous inactivity accounting (Ethereum Bellatrix parity).
- manager
- Slashing-lifecycle manager: optimistic admission, appeal windows, and finalisation.
- orchestration
- Epoch-boundary orchestration.
- participation
- Participation-flag accounting (Ethereum Altair parity).
- pending
- Pending-slash book + lifecycle-state types.
- protection
- Self-slashing protection for a single validator.
- remark
- REMARK wire encoding + on-chain admission helpers.
- system
SlashingSystemgenesis bootstrap.- traits
- External-state traits.
Constants§
- SLASH_
LOOKBACK_ EPOCHS - Maximum lookback for slashable offenses (in epochs).