Skip to main content

Module actor

Module actor 

Source
Expand description

Feed actor implementation.

This actor:

  • Receives consensus activity (notarizations, finalizations)
  • Updates shared state (accessible by RPC handlers)
  • Broadcasts events to subscribers

Block resolution uses [marshal::Mailbox::subscribe_by_digest] to wait for the block to become available, avoiding a race where the block hasnโ€™t been stored yet when the activity arrives.

The actor always polls the oldest (lowest-round) pending subscription so that events are emitted in order. Notarizations are dropped when a finalization at a higher-or-equal round is pending, since the finalization supersedes them.

Structsยง

Actor ๐Ÿ”’
PendingSubscription ๐Ÿ”’
A pending block subscription paired with its originating activity.

Functionsยง

now_millis ๐Ÿ”’
Get current Unix timestamp in milliseconds.

Type Aliasesยง

FeedActivity ๐Ÿ”’
Type alias for the activity type used by the feed actor.
Receiver ๐Ÿ”’
Receiver for activity messages.