Module solana_program::clock
source · Expand description
Information about the network’s clock, ticks, slots, etc.
Structs
- 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
- 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 itsrecent_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. - More delay is expected if CUDA is not enabled (as signature verification takes longer)
- This is maximum time consumed in forwarding a transaction from one node to next, before it can be processed in the target node
Type Definitions
- Uniquely distinguishes every version of a slot, even if the slot number is the same, i.e. duplicate slots
- Epoch is a unit of time a given leader schedule is honored, some number of Slots.
- Slot is a unit of time given to a leader for encoding, is some some number of Ticks long.
- SlotCount is the number of slots in a epoch
- SlotIndex is an index to the slots of a epoch
- UnixTimestamp is an approximate measure of real-world time, expressed as Unix time (ie. seconds since the Unix epoch)