Skip to main content

Module stake_table

Module stake_table 

Source

ModulesΒ§

stake_table_state_rlp πŸ”’

StructsΒ§

StakeTableState
ValidatorSet

EnumsΒ§

GetStakeTablesError πŸ”’
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Β§

DisplayLog πŸ”’
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 p and reward rate R(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 None instead 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Β§

ApplyEventResult πŸ”’
The result of applying a stake table event:
AuthenticatedValidatorMap
RegisteredValidatorMap
StakeTableHash