Expand description
Information about the network’s clock, ticks, slots, etc.
Time in Solana is marked primarily by slots, which are numbered sequentially. For every slot, a leader is chosen from the validator set, and that leader is expected to produce a new block, though sometimes leaders may fail to do so. Blocks can be identified by their slot number, and some slots do not contain a block.
An approximation of the passage of real-world time can be calculated by
multiplying a number of slots by DEFAULT_MS_PER_SLOT, which is the SDK’s
default target time for the network to produce slots. Note though that this
method suffers a variable amount of drift, as the network does not produce
slots at exactly the target rate. Furthermore, the effective target is changed
dynamically by SIMD-0525, so clients that require the cluster’s current value
must not assume the SDK default reflects the cluster.
The network’s current view of the real-world time can always be accessed via
Clock::unix_timestamp, which is produced by an oracle derived from the
validator set.
Modules§
- sysvar
sysvar
Structs§
- Clock
- A representation of network time.
Constants§
- DEFAULT_
DEV_ SLOTS_ PER_ EPOCH - DEFAULT_
HASHES_ PER_ SECOND - DEFAULT_
HASHES_ PER_ TICK - DEFAULT_
HASHES_ PER_ TICK_ 200_ MS - DEFAULT_
HASHES_ PER_ TICK_ 250_ MS - DEFAULT_
HASHES_ PER_ TICK_ 300_ MS - DEFAULT_
HASHES_ PER_ TICK_ 350_ MS - DEFAULT_
HASHES_ PER_ TICK_ 400_ MS - DEFAULT_
MS_ PER_ SLOT - The SDK’s default expected duration of a slot (300 milliseconds).
- DEFAULT_
MS_ PER_ SLOT_ 200_ MS - DEFAULT_
MS_ PER_ SLOT_ 250_ MS - DEFAULT_
MS_ PER_ SLOT_ 300_ MS - DEFAULT_
MS_ PER_ SLOT_ 350_ MS - DEFAULT_
MS_ PER_ SLOT_ 400_ MS - DEFAULT_
NS_ PER_ SLOT - The SDK’s default expected duration of a slot, in nanoseconds.
- DEFAULT_
NS_ PER_ SLOT_ 200_ MS - DEFAULT_
NS_ PER_ SLOT_ 250_ MS - DEFAULT_
NS_ PER_ SLOT_ 300_ MS - DEFAULT_
NS_ PER_ SLOT_ 350_ MS - DEFAULT_
NS_ PER_ SLOT_ 400_ MS - DEFAULT_
NS_ PER_ TICK - The default duration of a tick, in nanoseconds.
- DEFAULT_
NS_ PER_ TICK_ 200_ MS - DEFAULT_
NS_ PER_ TICK_ 250_ MS - DEFAULT_
NS_ PER_ TICK_ 300_ MS - DEFAULT_
NS_ PER_ TICK_ 350_ MS - DEFAULT_
NS_ PER_ TICK_ 400_ MS - DEFAULT_
SLOTS_ PER_ EPOCH - The number of slots per epoch after initial network warmup.
- DEFAULT_
S_ PER_ SLOT - DEFAULT_
S_ PER_ SLOT_ 200_ MS - DEFAULT_
S_ PER_ SLOT_ 250_ MS - DEFAULT_
S_ PER_ SLOT_ 300_ MS - DEFAULT_
S_ PER_ SLOT_ 350_ MS - DEFAULT_
S_ PER_ SLOT_ 400_ MS - DEFAULT_
TICKS_ PER_ SECOND - The default whole-number tick rate (213 per second).
- DEFAULT_
TICKS_ PER_ SECOND_ 200_ MS - DEFAULT_
TICKS_ PER_ SECOND_ 250_ MS - DEFAULT_
TICKS_ PER_ SECOND_ 300_ MS - DEFAULT_
TICKS_ PER_ SECOND_ 350_ MS - DEFAULT_
TICKS_ PER_ SECOND_ 400_ MS - Whole ticks per second at each target slot time.
- DEFAULT_
TICKS_ PER_ SLOT - The number of ticks in a slot.
- FORWARD_
TRANSACTIONS_ TO_ LEADER_ AT_ SLOT_ OFFSET - Transaction forwarding, which leader to forward to and how long to hold
- GENESIS_
EPOCH - HOLD_
TRANSACTIONS_ SLOT_ OFFSET - INITIAL_
RENT_ EPOCH - MAX_
HASH_ AGE_ IN_ SECONDS - MAX_
HASH_ AGE_ IN_ SECONDS_ 200_ MS - MAX_
HASH_ AGE_ IN_ SECONDS_ 250_ MS - MAX_
HASH_ AGE_ IN_ SECONDS_ 300_ MS - MAX_
HASH_ AGE_ IN_ SECONDS_ 350_ MS - MAX_
HASH_ AGE_ IN_ SECONDS_ 400_ MS - The time window of recent block hash values over which the bank will track signatures.
- 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 - The number of whole milliseconds per tick (4).
- MS_
PER_ TICK_ 200_ MS - MS_
PER_ TICK_ 250_ MS - MS_
PER_ TICK_ 300_ MS - MS_
PER_ TICK_ 350_ MS - MS_
PER_ TICK_ 400_ MS - SECONDS_
PER_ DAY - SIZE
- Serialized size of the
Clocksysvar account. - TICKS_
PER_ DAY - TICKS_
PER_ DAY_ 200_ MS - TICKS_
PER_ DAY_ 250_ MS - TICKS_
PER_ DAY_ 300_ MS - TICKS_
PER_ DAY_ 350_ MS - TICKS_
PER_ DAY_ 400_ MS
Type Aliases§
- BankId
- Uniquely distinguishes every version of a slot.
- Epoch
- The unit of time a given leader schedule is honored.
- Slot
- The unit of time given to a leader for encoding a block.
- Slot
Count - The number of slots in a epoch.
- Slot
Index - An index to the slots of a epoch.
- Unix
Timestamp - An approximate measure of real-world time.