Expand description
Protocol constants for dig-slashing.
Traces to: SPEC.md §2.
Every value here is protocol law — changing any one constant requires a protocol version bump, not a bug fix. Downstream crates re-export from this module; no other file in this crate defines BPS values, quotients, or domain tags.
§Why a flat module instead of a const enum
The constants are consumed across almost every other module (evidence
verification, appeal adjudication, reward math, inactivity accounting).
A flat module with pub const items is the cheapest interface for that
usage pattern — no trait dispatch, no import noise, and every reference
shows up clearly in cargo-udeps / gitnexus impact analysis when a
consumer is added or removed.
Constants§
- APPELLANT_
BOND_ MOJOS - Appellant bond required to file an appeal — same size as the reporter bond.
- ATTESTATION_
BASE_ BPS - Base penalty for both attester offenses (
AttesterDoubleVote,AttesterSurroundVote) — 1%. - BASE_
REWARD_ FACTOR - Ethereum Altair base-reward scaling factor.
- BLS_
PUBLIC_ KEY_ SIZE - BLS12-381 G1 public key compressed width (bytes).
- BLS_
SIGNATURE_ SIZE - BLS12-381 G2 signature compressed width (bytes).
- BOND_
AWARD_ TO_ WINNER_ BPS - 50/50 winner-award / burn split in basis points applied to a forfeited bond.
- BPS_
DENOMINATOR - BPS denominator:
10_000basis points = 100%. - DOMAIN_
BEACON_ ATTESTER - Domain tag for
AttestationData::signing_root(DSL-004). - DOMAIN_
BEACON_ PROPOSER - Domain tag for proposer
block_signing_message(DSL-013, DSL-018). - DOMAIN_
SLASHING_ EVIDENCE - Domain tag for
SlashingEvidence::hash(DSL-002). - DOMAIN_
SLASH_ APPEAL - Domain tag for
SlashAppeal::hash(DSL-058, DSL-159). - EQUIVOCATION_
BASE_ BPS - Base penalty for
OffenseType::ProposerEquivocation— 5%. - INACTIVITY_
PENALTY_ QUOTIENT - Divisor in the inactivity-penalty formula.
- INACTIVITY_
SCORE_ BIAS - Per-epoch inactivity-score increment for a missed target vote during a finality stall.
- INACTIVITY_
SCORE_ RECOVERY_ RATE - Per-epoch global inactivity-score recovery applied once finality has resumed.
- INVALID_
BLOCK_ BASE_ BPS - Base penalty for
OffenseType::InvalidBlock— 3%. - MAX_
APPEALS_ PER_ BLOCK - Block-level cap on appeal REMARKs —
64. - MAX_
APPEAL_ ATTEMPTS_ PER_ SLASH - Maximum distinct appeal attempts per pending slash.
- MAX_
APPEAL_ PAYLOAD_ BYTES - Maximum serialized-bytes length of a
SlashAppealenvelope. - MAX_
PENALTY_ BPS - Maximum single-offense BPS floor — 10%.
- MAX_
PENDING_ SLASHES - Maximum number of pending slashes the manager will track.
- MAX_
SLASH_ PROPOSALS_ PER_ BLOCK - Block-level cap on evidence REMARKs —
64. - MAX_
SLASH_ PROPOSAL_ PAYLOAD_ BYTES - Maximum size of a slash-proposal payload (
failure_witnessbytes + appeal witness bytes combined) in bytes. - MAX_
VALIDATORS_ PER_ COMMITTEE - Maximum number of validator indices in a single
IndexedAttestation. - MIN_
ATTESTATION_ INCLUSION_ DELAY - Minimum inclusion delay for an attestation to be reward-eligible, in slots.
- MIN_
EFFECTIVE_ BALANCE - Minimum per-validator effective balance, in mojos —
32e9(32 DIG). - MIN_
EPOCHS_ TO_ INACTIVITY_ PENALTY - Epoch gap beyond which the network is in a finality stall.
- MIN_
SLASHING_ PENALTY_ QUOTIENT - Ethereum-parity minimum-slashing-penalty quotient —
32. - PROPORTIONAL_
SLASHING_ MULTIPLIER - Ethereum-parity proportional-slashing multiplier —
3. - PROPOSER_
REWARD_ QUOTIENT - Proposer inclusion-reward divisor —
8. - PROPOSER_
WEIGHT - Proposer-inclusion reward weight (Ethereum Altair parity).
- REPORTER_
BOND_ MOJOS - Reporter bond required to submit slashing evidence —
MIN_EFFECTIVE_BALANCE / 64. - SLASH_
APPEAL_ REMARK_ MAGIC_ V1 - Magic prefix for appeal REMARK payloads (DSL-110).
- SLASH_
APPEAL_ WINDOW_ EPOCHS - Appeal window length in epochs —
8. - SLASH_
EVIDENCE_ REMARK_ MAGIC_ V1 - Magic prefix for evidence REMARK payloads (DSL-102).
- SLASH_
LOCK_ EPOCHS - Exit-lock duration for a finalised slash —
100epochs. - TIMELY_
HEAD_ FLAG_ INDEX - Bit index of the
TIMELY_HEADflag inParticipationFlags. - TIMELY_
HEAD_ WEIGHT - Reward weight for a correct HEAD vote (TIMELY_HEAD).
- TIMELY_
SOURCE_ FLAG_ INDEX - Bit index of the
TIMELY_SOURCEflag inParticipationFlags. - TIMELY_
SOURCE_ MAX_ DELAY_ SLOTS - Maximum inclusion delay for an attestation to count as
TIMELY_SOURCE, in slots. - TIMELY_
SOURCE_ WEIGHT - Reward weight for a correct SOURCE vote (TIMELY_SOURCE).
- TIMELY_
TARGET_ FLAG_ INDEX - Bit index of the
TIMELY_TARGETflag inParticipationFlags. - TIMELY_
TARGET_ MAX_ DELAY_ SLOTS - Maximum inclusion delay for an attestation to count as
TIMELY_TARGET, in slots. - TIMELY_
TARGET_ WEIGHT - Reward weight for a correct TARGET vote (TIMELY_TARGET).
- WEIGHT_
DENOMINATOR - Weight denominator for the Altair flag-reward split.
- WHISTLEBLOWER_
REWARD_ QUOTIENT - Whistleblower reward divisor —
512.