MCPcopy Create free account
hub / github.com/SeismicSystems/summit / handle_finalized_block

Method handle_finalized_block

finalizer/src/actor.rs:399–734  ·  view source on GitHub ↗
(
        &mut self,
        ack_tx: Exact,
        block: Block,
        finalization: Option<
            Finalization<bls12381_multisig::Scheme<PublicKey, V>, <Block as Digestible>::Digest>,
      

Source from the content-addressed store, hash-verified

397 canonical_state: ConsensusState,
398
399 // Fork states (notarized but not yet finalized)
400 fork_states: BTreeMap<u64, BTreeMap<Digest, ForkState>>,
401
402 // Tombstones for fork states that were executed before a conflicting
403 // ancestor finalized. Later NotifyAtHeight calls for these digests should
404 // fail immediately instead of being stored as waiters for a block that can
405 // no longer become canonical-compatible.
406 dead_fork_digests: HashSet<(u64, Digest)>,
407
408 // Orphaned notarized blocks that arrived before their parent
409 orphaned_blocks: BTreeMap<u64, HashMap<Digest, Vec<Block>>>,
410
411 // Finalized blocks deferred because the EL returned SYNCING.
412 // FIFO, drained in arrival (= height) order by `drain_pending`.
413 pending_finalized: VecDeque<PendingFinalized<V>>,
414
415 // Notarized blocks deferred because the EL returned SYNCING.
416 // FIFO; each entry is retried independently because forks have independent
417 // parent states which are re-resolved by `handle_notarized_block` on drain.
418 pending_notarized: VecDeque<PendingNotarized>,
419 // Membership set for deduping `pending_notarized` by block digest.
420 pending_notarized_keys: HashSet<Digest>,
421
422 // Whether either buffer has crossed the warn threshold since the last
423 // time it was empty. Edge-triggered to avoid log spam on every tick.
424 pending_warn_active: bool,
425
426 // How often `drain_pending` runs while the EL is recovering from SYNCING.
427 drain_interval: Duration,
428
429 // Soft threshold for emitting a warn log when either pending buffer grows.
430 // No cap is enforced; observability only.
431 buffered_blocks_warn_threshold: usize,
432 // Hard cap for unique deferred notarized blocks while the EL is SYNCING.
433 pending_notarized_max: usize,
434
435 genesis_hash: [u8; 32],
436 protocol_consts: ProtocolConsts,
437 deposit_signature_domain: Digest,
438 oracle: O,
439 node_public_key: PublicKey,
440
441 /// Chain bound domain (`chain_domain(config_digest)`) used to derive the
442 /// authorized observer child keys. Must match the domain the live P2P
443 /// observer signer is derived with (see node startup), or observers will
444 /// not be authenticated. Distinct from the raw deposit namespace, which is
445 /// already folded into `deposit_signature_domain`.
446 observer_domain: Vec<u8>,
447 validator_exit: bool,
448 cancellation_token: CancellationToken,
449 _signer_marker: PhantomData<S>,
450 _variant_marker: PhantomData<V>,
451 #[cfg(debug_assertions)]
452 height_gauge: Gauge,
453 #[cfg(debug_assertions)]
454 consensus_state_stored_gauge: Gauge,
455}
456

Callers

nothing calls this directly

Calls 15

execute_blockFunction · 0.85
is_last_block_of_epochFunction · 0.85
derive_observer_keysFunction · 0.85
getMethod · 0.80
get_forkchoiceMethod · 0.80
lenMethod · 0.80
height_notify_up_toMethod · 0.80
get_epocherMethod · 0.80
get_epochMethod · 0.80
registerMethod · 0.80

Tested by

no test coverage detected