Skip to main content

Module constants

Module constants 

Source
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_000 basis 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 SlashAppeal envelope.
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_witness bytes + 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 — 100 epochs.
TIMELY_HEAD_FLAG_INDEX
Bit index of the TIMELY_HEAD flag in ParticipationFlags.
TIMELY_HEAD_WEIGHT
Reward weight for a correct HEAD vote (TIMELY_HEAD).
TIMELY_SOURCE_FLAG_INDEX
Bit index of the TIMELY_SOURCE flag in ParticipationFlags.
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_TARGET flag in ParticipationFlags.
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.