Expand description
Grid topology support module Grid topology support implementation The basic operation of the 2D grid topology is that:
- A validator producing a message sends it to its row-neighbors and its column-neighbors
 - A validator receiving a message originating from one of its row-neighbors sends it to its column-neighbors
 - A validator receiving a message originating from one of its column-neighbors sends it to its row-neighbors
 
This grid approach defines 2 unique paths for every validator to reach every other validator in at most 2 hops.
However, we also supplement this with some degree of random propagation: every validator, upon seeing a message for the first time, propagates it to 8 random peers. This inserts some redundancy in case the grid topology isn’t working or is being attacked - an adversary doesn’t know which peers a validator will send to. This is combined with the property that the adversary doesn’t know which validators will elect to check a block.
Structs§
- Grid
Neighbors  - Information about the grid neighbors for a particular node in the topology.
 - Random
Routing  - A representation of routing based on sample
 - Session
Bound Grid Topology Storage  - A storage for the current and maybe previous topology
 - Session
Grid Topologies  - A set of topologies indexed by session
 - Session
Grid Topology  - Topology representation for a session.
 - Session
Grid Topology Entry  - An entry tracking a session grid topology and some cached local neighbors.
 - Topology
Peer Info  - Information about a peer in the gossip topology for a session.
 
Enums§
- Required
Routing  - Routing mode
 
Constants§
- DEFAULT_
RANDOM_ CIRCULATION  - The number of peers to randomly propagate messages to.
 - DEFAULT_
RANDOM_ SAMPLE_ RATE  - The sample rate for randomly propagating messages. This reduces the left tail of the binomial distribution but also introduces a bias towards peers who we sample before others (i.e. those who get a block before others).