You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module uses an event-queue-based architecture. A `NetworkManager` is responsible for creating a set of `PeerConnection`s and sending commands to them. Each `PeerConnection` maintains a connection to a single peer; it responds to commands from the `NetworkManager`, and emits events to an event queue. The `NetworkManager` reads from that queue to decide which chain to follow. When blocks from the preferred chain have been fetched, it publishes those blocks to the message bus.
4
+
5
+
This module requests the body for every block announced by any chain, from the first chain which announced it. When it has the body for the next block announced, it will publish it to the message bus.
The peer network interface module uses the ChainSync and BlockFetch protocols to fetch blocks from one of several upstream sources. It chooses one peer to treat as the "preferred" chain to follow, but will gracefully switch which peer it follows during network issues.
4
+
5
+
It can either run independently, from the origin or current tip, or
6
+
be triggered by a Mithril snapshot event (the default) where it starts from
7
+
where the snapshot left off, and follows the chain from there.
8
+
9
+
Rollbacks are handled by signalling in the block data - it is downstream
10
+
subscribers' responsibility to deal with the effects of this.
11
+
12
+
## Configuration
13
+
14
+
See [./config.default.toml](./config.default.toml) for the available configuration options and their default values.
15
+
16
+
## Messages
17
+
18
+
This module publishes "raw block messages" to the configured `block-topic`. Each message includes the raw bytes composing the header and body of a block. The module follows the head of one chain at any given time, though that chain may switch during runtime. If that chain reports a rollback (or if this module switches to a different chain), the next message it emits will be the new head of the chain and have the status `RolledBack`.
0 commit comments