ModulesΒ§
StructsΒ§
EnumsΒ§
- GetStake
Tables πError - Error representing fail cases for retrieving the stake table.
ConstantsΒ§
- DECAF_
INITIAL_ πSUPPLY_ WEI - ESP token initial supply on the Decaf testnet, in wei (18 decimals).
- DECAF_
STAKE_ πTABLE_ CONTRACT - MAINNET_
INITIAL_ πSUPPLY_ WEI - ESP token initial supply on Espresso mainnet, in wei (18 decimals).
- MAINNET_
STAKE_ πTABLE_ CONTRACT - PROGRESS_
INTERVAL π - Elapsed time between progress reports during an L1 event scan, checked between chunks.
- STORE_
EVENTS_ πATTEMPTS - Attempts to persist a batch of fetched L1 events before giving up.
- STORE_
EVENTS_ πRETRY_ DELAY - Delay between those attempts.
TraitsΒ§
- Display
Log π - Format the alloy Log RPC type in a way to make it easy to find the event in an explorer.
FunctionsΒ§
- calculate_
proportion_ staked_ and_ reward_ rate - Calculates the stake ratio
pand reward rateR(p). - compute_
block_ πreward - known_
initial_ πsupply - Returns the ESP tokenβs initial supply for the stake table contracts where it is already known.
- parse_
x25519_ πkey - The contract enforces canonical nonzero encodings, so an error here means a
contract bug. Callers degrade it to
Noneinstead of aborting (defense in depth): the key only affects p2p networking, not consensus safety, so this is preferred over halting stake table processing on every node. The zero check is explicit because the Rust parser accepts the zero encoding. - retry π
- select_
active_ πvalidator_ set - Select active validators
- sort_
stake_ πtable_ events - to_
registered_ validator_ map - validators_
from_ l1_ events
Type AliasesΒ§
- Apply
Event πResult - The result of applying a stake table event:
- Authenticated
Validator Map - Registered
Validator Map - Stake
Table Hash