Skip to content

feat: enhance OptimumP2P documentation - #17

Merged
swarna1101 merged 10 commits into
mainfrom
enhance-optimum-p2p-docs
Jul 31, 2025
Merged

feat: enhance OptimumP2P documentation#17
swarna1101 merged 10 commits into
mainfrom
enhance-optimum-p2p-docs

Conversation

@swarna1101

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jul 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:50am

@alexanderbez alexanderbez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

utACK

Comment thread docs/learn/overview/p2p.md Outdated

The data flow diagram illustrates how OptimumP2P integrates with blockchain infrastructure to provide enhanced data propagation. The system operates through three main components: the Validator Node, the Optimum Service, and the Networks layer.

At the **Validator Node** level, the Optimum Agent interfaces directly with the blockchain client through IPC (Inter-Process Communication). Transaction data flows from the blockchain client to the Optimum Agent, which serves as the bridge between the blockchain infrastructure and the OptimumP2P network.

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.

? IPC?

Comment thread docs/learn/overview/p2p.md Outdated

At the **Validator Node** level, the Optimum Agent interfaces directly with the blockchain client through IPC (Inter-Process Communication). Transaction data flows from the blockchain client to the Optimum Agent, which serves as the bridge between the blockchain infrastructure and the OptimumP2P network.

The **Optimum Service** acts as the central processing unit where the core RLNC encoding and network coordination takes place. When transaction data arrives from the Optimum Agent, the service applies Random Linear Network Coding to create redundant, encoded shards that can be efficiently propagated across the network.

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.

Agent?

Comment thread docs/learn/overview/p2p.md Outdated

## Security Model

OptimumP2P implements a comprehensive security model to protect against various attack vectors. The system uses Boneh-Lynn-Shacham (BLS) signatures to provide authentication and non-repudiation for all network communications. Cryptographic hashing ensures data integrity throughout the network, while distributed key management with on-chain registration and verification provides secure identity management.

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.

Where is the BLS used?

Comment thread docs/learn/overview/p2p.md Outdated
Comment on lines 16 to 21
OptimumP2P addresses these limitations through RLNC, a technique that enables optimal data propagation in distributed networks. Instead of forwarding entire messages, nodes transmit smaller, coded pieces (shards) of the original data.

<div class="theme-aware-image">
<img src="/static/img/P2P_data_flow_light.png" alt="OptimumP2P Data Flow" class="light-mode-only">
<img src="/static/img/P2P_data_flow_dark.png" alt="OptimumP2P Data Flow" class="dark-mode-only">
</div>

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.

this image why?

Comment thread docs/learn/overview/p2p.md Outdated

The data flow diagram illustrates how OptimumP2P integrates with blockchain infrastructure to provide enhanced data propagation. The system operates through three main components: the Validator Node, the Optimum Service, and the Networks layer.
The data flow involves three main components:
1. **Validator Node Integration**: OptimumP2P interfaces directly with a blockchain client to access data, such as newly produced blocks or transactions.

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.

incorrect

Comment thread docs/learn/overview/p2p.md Outdated

* High latency: Peers must receive full messages before forwarding.
* Bandwidth waste: Peers may receive multiple redundant copies of the same message.
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:

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.

right now, because of the sidecar we have added that has given the option to run either of the algorithms (gossipsub or optimump2p)

Comment thread docs/learn/overview/p2p.md Outdated

## RLNC and OptimumP2P
* **[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

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.

no protocol selection, it's a sidecar feature, which is a temporary

1. **Message Preparation**: The original message is prepared for coding by adding length prefixes and padding if necessary
2. **RLNC Encoding**: The message is divided into `k` fragments and encoded using RLNC into multiple shards using configurable parameters:
* `ShredFactor`: Controls how the data is fragmented
* `PublisherShardMultiplier`: Determines how many shards to create initially

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.

Add a section about the parameters and cite here as a ref.

Comment thread docs/learn/overview/p2p.md Outdated
Comment on lines +64 to +70
## Beyond Just Validators: Ecosystem-Wide Benefits

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

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

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.

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.

Let's not use it here; it may create confusion

* Improves experience for multiplayer, onchain games and social dApps
* Reduces costs of redundant relay infra through efficient data spreading

## Security Model

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.

Discuss with @kishori82 about discussing or mentioning RUGBY protocol here

* **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

Comment thread docs/learn/overview/p2p.md Outdated

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.

@hpsing hpsing left a comment

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.

couple of comments else LGTM! good job 🥇 . get a final review from @kishori82

@swarna1101
swarna1101 added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit b3fa7d2 Jul 31, 2025
4 checks passed
@swarna1101
swarna1101 deleted the enhance-optimum-p2p-docs branch July 31, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants