Module solana_program::clock[][src]

Provides information about the network’s clock which is made up of ticks, slots, etc…

Structs

Clock

Clock represents network time. Members of Clock start from 0 upon network boot. The best way to map Clock to wallclock time is to use current Slot, as Epochs vary in duration (they start short and grow as the network progresses).

Constants

DEFAULT_DEV_SLOTS_PER_EPOCH
DEFAULT_HASHES_PER_SECOND
DEFAULT_HASHES_PER_TICK
DEFAULT_MS_PER_SLOT
DEFAULT_SLOTS_PER_EPOCH
DEFAULT_TICKS_PER_SECOND
DEFAULT_TICKS_PER_SLOT
GENESIS_EPOCH
MAX_HASH_AGE_IN_SECONDS

The time window of recent block hash values that the bank will track the signatures of over. Once the bank discards a block hash, it will reject any transactions that use that recent_blockhash in a transaction. Lowering this value reduces memory consumption, but requires clients to update its recent_blockhash more frequently. Raising the value lengthens the time a client must wait to be certain a missing transaction will not be processed by the network.

MAX_PROCESSING_AGE
MAX_RECENT_BLOCKHASHES
MAX_TRANSACTION_FORWARDING_DELAY

More delay is expected if CUDA is not enabled (as signature verification takes longer)

MAX_TRANSACTION_FORWARDING_DELAY_GPU

This is maximum time consumed in forwarding a transaction from one node to next, before it can be processed in the target node

MS_PER_TICK
NUM_CONSECUTIVE_LEADER_SLOTS
SECONDS_PER_DAY
SLOT_MS
TICKS_PER_DAY

Type Definitions

Epoch

Epoch is a unit of time a given leader schedule is honored, some number of Slots.

Slot

Slot is a unit of time given to a leader for encoding, is some some number of Ticks long.

SlotCount

SlotCount is the number of slots in a epoch

SlotIndex

SlotIndex is an index to the slots of a epoch

UnixTimestamp

UnixTimestamp is an approximate measure of real-world time, expressed as Unix time (ie. seconds since the Unix epoch)