Skip to main content

Module context

Module context 

Source

MacrosΒ§

spawn_with_log_level πŸ”’

StructsΒ§

DecideProcessorMetrics πŸ”’
Metrics for the background decide processor. backlog (decided - processed) is the key signal: sustained growth means staging tables accumulate (no data lost, but disk grows).
SequencerContext
The sequencer context contains a consensus handle and other sequencer specific information.
TaskList

ConstantsΒ§

OUTBOUND_MESSAGE_CHANNEL_CAPACITY πŸ”’
Responders block on the outbound channel while holding request-response admission permits.
PROCESS_RETRY_INTERVAL πŸ”’
REQUEST_RESPONSE_CHANNEL_CAPACITY πŸ”’
Inbound request-response messages are dropped (not queued) when this channel is full. A node catching up has many batched requests in flight, each answered by up to request_batch_size peers per batch interval, so this must comfortably exceed that fan-in.
SIGNER_QUEUE_CAPACITY πŸ”’
Decides the signer may fall behind by before it drops the oldest ones.

FunctionsΒ§

handle_events πŸ”’
process_decided_events_task πŸ”’
Turns persisted decided leaves into query-service decide events and GCs processed data. Decoupled from handle_events so slow ingestion/GC can’t stall (or drop) consensus events; cursor-driven, so it can lag without losing data.
restored_upgrade_lock πŸ”’
A decided certificate at or below the configured base is from a completed upgrade; kept, it would make UpgradeLock::version fail once the target moves on.
running_version πŸ”’
The version the chain runs now: the decided upgrade’s, or the base when none was decided.
seed_membership πŸ”’
sign_decided_leaves πŸ”’
Signs and relays the newest leaf of every decide, in order, off the event loop, because a relay post can take as long as its HTTP timeout. The relay needs a threshold of signatures on one height, so every node must sign the same heights. Signing every decide keeps that while posts fall behind, and dropping only the oldest once the queue is full keeps it as well.

Type AliasesΒ§

DecideSignal πŸ”’
Latest decided view, sent from the event loop to the background decide processor. None is the initial/no-op value of the watch channel.