ouroboros-consensus-0.3.1.0: Consensus layer for the Ouroboros blockchain protocol

Ouroboros.Consensus.BlockchainTime.WallClock.Util

Contents

Description

Support for defining BlockchainTime instances

Synopsis

# Tracing

Time related tracing

The t parameter can be instantiated by the time, e.g., UTCTime or RelativeTime.

Constructors

 TraceStartTimeInTheFuture SystemStart NominalDiffTime The start time of the blockchain time is in the futureWe have to block (for NominalDiffTime) until that time comes. TraceCurrentSlotUnknown t PastHorizonException Current slot is not yet knownThis happens when the tip of our current chain is so far in the past that we cannot translate the current wallclock to a slot number, typically during syncing. Until the current slot number is known, we cannot produce blocks. Seeing this message during syncing therefore is normal and to be expected.We record the current time (the time we tried to translate to a SlotNo) as well as the PastHorizonException, which provides detail on the bounds between which we can do conversions. The distance between the current time and the upper bound should rapidly decrease with consecutive TraceCurrentSlotUnknown messages during syncing. TraceSystemClockMovedBack t t The system clock moved back an acceptable time span, e.g., because of an NTP sync.The system clock moved back such that the new current slot would be smaller than the previous one. If this is within the configured limit, we trace this warning but *do not change the current slot*. The current slot never decreases, but the current slot may stay the same longer than expected.When the system clock moved back more than the configured limit, we shut down with a fatal exception.

#### Instances

Instances details
 Source # Instance details Methodsfmap ∷ (a → b) → TraceBlockchainTimeEvent a → TraceBlockchainTimeEvent b Source # Source # Instance details Methods

# Exceptions

Constructors

 SystemClockMovedBack SlotNo SlotNo The system clock got moved back so far that the slot number decreasedWe record the the slot number before and after the change.

#### Instances

Instances details
 Source # Instance details Source # Instance details