Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions docs/learn/overview/p2p.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ OptimumP2P is a gossip mechanism based on RLNC, also known as Galois Gossip, tha

### Node Architecture

OptimumP2P is implemented as a P2P node that can run either the traditional [GossipSub](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) protocol or the enhanced OptimumP2P protocol with RLNC. The node maintains:
OptimumP2P is implemented as a P2P node that enhances traditional gossip protocols with RLNC capabilities. The node maintains:

* **[libp2p](https://docs.libp2p.io/) Host**: The underlying network layer for peer connections
* **Protocol Selection**: Can run [GossipSub](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub), OptimumP2P, or both protocols simultaneously
* **Mesh Topology**: Maintains peer connections similar to [GossipSub](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) with configurable mesh degrees
* **RLNC Parameters**: Configurable shred factor, publisher multipliers, and forwarding thresholds
* **RLNC Parameters**: Configurable parameters for encoding and forwarding behavior (see [Configuration Parameters](#configuration-parameters))

### Random Linear Network Coding (RLNC) Fundamentals

Expand Down Expand Up @@ -61,13 +60,31 @@ OptimumP2P uses control messages similar to [GossipSub](https://github.com/libp2
* **IWANT**: Requests additional shards for a message that hasn't been fully decoded
* **GRAFT/PRUNE**: Manages mesh topology similar to [GossipSub](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub)

## Beyond Just Validators: Ecosystem-Wide Benefits
## Configuration Parameters

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can improve it more; let's add it as an issue and address it later with hackathon docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created it here: #19


OptimumP2P serves as a foundational, general-purpose data propagation protocol with benefits extending across various blockchain use cases.
OptimumP2P provides several configurable parameters to tune performance for different network conditions and requirements:

### RLNC Encoding Parameters

* **ShredFactor**: Controls how the data is fragmented into pieces before encoding. Higher values provide more granular sharding but increase computational overhead.
* **PublisherShardMultiplier**: Determines how many shards to create initially when publishing a message. Formula: `shards_created = ShredFactor * PublisherShardMultiplier`
* **ForwardShardThreshold**: Sets the threshold for intermediate nodes to create and forward new recoded shards. Nodes forward when they have more than `ShredFactor * ForwardShardThreshold` shards

### Mesh Topology Parameters

* **MeshDegreeTarget**: Target number of peers to maintain in the mesh overlay
* **MeshDegreeMin**: Minimum number of mesh peers before triggering grafting
* **MeshDegreeMax**: Maximum number of mesh peers before triggering pruning

![OptimumP2P Validator Implementation](/static/img/img_2.png)
### Performance Tuning

The diagram above shows an example sidecar integration pattern where OptimumP2P runs alongside existing consensus layer clients. This allows validators to benefit from enhanced data propagation without modifying their core consensus software.
* **RandomMessageSize**: Default message size used for testing and benchmarking (in bytes)

These parameters can be adjusted based on network conditions, bandwidth constraints, and latency requirements to optimize OptimumP2P performance for specific use cases.

## Beyond Just Validators: Ecosystem-Wide Benefits

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond Just Validators looks confusing, let's not use it, let's add it as one 1of the use cases.


OptimumP2P serves as a foundational, general-purpose data propagation protocol with benefits extending across various blockchain use cases.

### Classic L1s: Ethereum, Solana, Cosmos

Expand Down
Binary file removed static/img/img_2.png
Binary file not shown.