Skip to content

docs: add rlnc test documentation#71

Open
paiva wants to merge 3 commits into
mainfrom
rlnc-arch-test
Open

docs: add rlnc test documentation#71
paiva wants to merge 3 commits into
mainfrom
rlnc-arch-test

Conversation

@paiva

@paiva paiva commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added a deployment and end-to-end testing guide for the P2P RLNC binary, including local cluster setup, server startup, readiness checks, and a gRPC publish/subscribe verification flow.
    • Documented two Go multi-stream client tools with build steps, CLI options (topic and node ranges), publish pacing controls, optional Poisson publishing, and example commands plus expected TSV output formats.

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new documentation file adds an end-to-end guide for deploying and testing a P2P RLNC binary. It covers dependency updates, building and deploying the binary, starting a local node cluster and server, verifying node readiness, and using two Go multi-stream client tools with their CLI options, output formats, and hash-based verification flow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 7 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is related to the change, but it does not match the required type(<domain/pkg>): <short imperative summary> format. Rename it to include a domain/package in parentheses, for example docs(rlnc): add test documentation.
Scope Discipline ⚠️ Warning Diff vs main changes docs/rlnctest.md and deletes grpc_p2p_client/local.ips.tsv; the deleted TSV is not referenced by the new guide. Remove the TSV deletion or explain why it’s needed for the docs task if it’s intentional.
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Behavior Safety ✅ Passed Only docs/rlnctest.md and an unreferenced sample IP list changed; no code paths or invariants were modified.
Over-Engineering ✅ Passed PASS: docs-only PR; no caches, helper layers, signature churn, or impl-detail tests were added, and the referenced binaries/flags already exist.
Security ✅ Passed Docs-only PR; rlnctest.md has deployment/test steps and no secrets, credentials, or unsafe code changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rlnc-arch-test

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 markdownlint-cli2 (0.22.1)
docs/rlnctest.md

markdownlint-cli2 wrapper config was not available before execution


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/rlnctest.md`:
- Around line 40-41: The mv command in the docs refers to a single binary ./p2p
but the Makefile actually builds multiple binaries (p2p-client,
p2p-multi-publish, p2p-multi-subscribe); update the instructions to specify
which binary(ies) to move (e.g., p2p-client or each of p2p-multi-publish and
p2p-multi-subscribe) or state that all three should be moved, and show the
correct filenames (./p2p-client, ./p2p-multi-publish, ./p2p-multi-subscribe) in
the example mv command so readers know exactly which artifact(s) to deploy.
- Line 13: Update the markdown code fences to improve readability: add explicit
language specifiers to the three fenced blocks that contain the snippet starting
with "github.com/getoptimum/optimum-p2p <new-version>" and the two other similar
blocks (use e.g. ```go, ```bash or ```tsv as appropriate), and insert a blank
line immediately before each of the other fenced blocks that currently run up
against preceding text (those containing the single-line command blocks like
"./p2p-multi-publish \"). Ensure each fence opens with a language token and that
there is a blank line separating prose from the opening ``` for the blocks
referenced.
- Around line 30-31: Replace the incorrect build command `make p2p` with the
correct target `make build` in the docs (update the occurrence of "make p2p" in
rlnctest.md to "make build") so the instructions invoke the Makefile's existing
target that builds all client binaries including the P2P client.
- Around line 97-99: The build commands in the docs reference non-existent
source files (p2p_client_multi_streams_publish.go and
p2p_client_multi_streams_subscribe.go); update the documented commands to point
to the actual cmd directories under grpc_p2p_client (use the
./grpc_p2p_client/cmd/multi-publish/ and ./grpc_p2p_client/cmd/multi-subscribe/
paths) so the commands are copy-pastable and match the repository layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: getoptimum/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4100a07e-9499-4031-9985-da33d5b83fc2

📥 Commits

Reviewing files that changed from the base of the PR and between bd8c0b8 and 80ffed2.

📒 Files selected for processing (1)
  • docs/rlnctest.md

Comment thread docs/rlnctest.md Outdated
Comment thread docs/rlnctest.md Outdated
Comment thread docs/rlnctest.md Outdated
Comment thread docs/rlnctest.md
Comment on lines +97 to +99
```bash
go build -o p2p-multi-publish p2p_client_multi_streams_publish.go
go build -o p2p-multi-subscribe p2p_client_multi_streams_subscribe.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find the actual source files for multi-publish and multi-subscribe

# Look for main.go files in cmd directories
fd -t f "main.go" grpc_p2p_client/cmd/

# Check if the referenced .go files exist
fd -t f -e go "p2p_client_multi_streams"

Repository: getoptimum/optimum-dev-setup-guide

Length of output: 198


Update build commands to reference the correct directory paths.

The documented build commands reference non-existent files (p2p_client_multi_streams_publish.go, p2p_client_multi_streams_subscribe.go). The actual source is located in the cmd subdirectories. Correct these to:

go build -o p2p-multi-publish ./grpc_p2p_client/cmd/multi-publish/
go build -o p2p-multi-subscribe ./grpc_p2p_client/cmd/multi-subscribe/

Ensure the documented commands are copy-pastable and match the repository structure.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/rlnctest.md` around lines 97 - 99, The build commands in the docs
reference non-existent source files (p2p_client_multi_streams_publish.go and
p2p_client_multi_streams_subscribe.go); update the documented commands to point
to the actual cmd directories under grpc_p2p_client (use the
./grpc_p2p_client/cmd/multi-publish/ and ./grpc_p2p_client/cmd/multi-subscribe/
paths) so the commands are copy-pastable and match the repository layout.

Comment thread docs/rlnctest.md
github.com/getoptimum/optimum-p2p <new-version>
```

Replace `<new-version>` with the version tag you just pushed (e.g. `v0.0.1-rc13`), then run:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maybe can add hash as example too (e.g. v0.0.1-rc13 or bd8c0b8)

Comment thread docs/rlnctest.md
Comment on lines +47 to +48

Run 50 local nodes:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

navigate to optimum-infra/optimump2p-native/

Comment thread docs/rlnctest.md
Run 50 local nodes:

```bash
./run-local 50

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

before run, make sure to update (LOCALHOST_IP: local IP address of the primary network interface) first
the cmd should be ./local-p2pnode-runs.sh run 50

Comment thread docs/rlnctest.md
## Step 7 — Verify All Nodes Are Running

```bash
./run-local list

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

./local-p2pnode-runs.sh list

Comment thread docs/rlnctest.md
Comment on lines +97 to +99
```bash
go build -o p2p-multi-publish p2p_client_multi_streams_publish.go
go build -o p2p-multi-subscribe p2p_client_multi_streams_subscribe.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this file doesn't exist, just use make build should be fine

Comment thread docs/rlnctest.md

---

## Publisher

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we should move subscriber on the top before doing any publish

Comment thread docs/rlnctest.md
-sleep 500ms -topic test-topic
```

Verify that message hashes in `test-outgoing.txt` appear in `test-incoming.txt`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we add a "validation result"?

RLNC Validation Results

The test achieved a total of 25,000 decoded messages, validating the full propagation of data across the network.

The Math:

  • 50 Nodes × 10 Unique Messages/Node = 500 Distinct Messages in the system.
  • 500 Messages × 50 Receiving Nodes = 25,000 Total Successful Deliveries.

The "RLNC Impact" Proof:

"The significance of RLNC is proven by the delta: without RLNC encoding/decoding, the total deliveries would drop from 25,000 to only 500 (representing only the locally generated messages that didn't require network transmission). This 50x increase in decoded volume confirms that our RLNC implementation is successfully driving the P2P message exchange.

@IsaacTai13 IsaacTai13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

left some recommended changes.

Comment thread docs/rlnctest.md
Comment on lines +222 to +224
**Terminal 1 — start the subscriber:**
```bash
./p2p-multi-subscribe \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we should give them an example to achieve 2500

./p2p-multi-subscribe
-ipfile ip.p2pnode.bnb.tsv
-output-data incoming-hash.txt
-topic test-topic

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/rlnctest.md`:
- Around line 165-168: The TSV examples in the documentation are space-aligned
instead of using real tab separators, which makes them inconsistent with the
actual TSV header format used by grpc_p2p_client/cmd/multi-publish/main.go.
Update the sample rows in the docs so the values are separated by literal tab
characters, and make the same correction in the other referenced TSV block as
well; keep the examples aligned with the sender, size, and sha256(msg) fields.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: getoptimum/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ede957a4-f77c-4c0a-9483-212cb64a74c5

📥 Commits

Reviewing files that changed from the base of the PR and between 80ffed2 and ce1f2e0.

⛔ Files ignored due to path filters (1)
  • grpc_p2p_client/local.ips.tsv is excluded by !**/*.tsv and included by none
📒 Files selected for processing (1)
  • docs/rlnctest.md

Comment thread docs/rlnctest.md
Comment on lines +165 to +168
```tsv
sender size sha256(msg)
34.127.26.15:33212 119 03fb89f1791f9bd70fa959a8acbae9dd...
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use real tab separators in the TSV examples.

These samples are described as TSV, but the rows are space-aligned. That makes the copied examples non-TSV and mismatches the publisher’s actual header format (sender\tsize\tsha256(msg) in grpc_p2p_client/cmd/multi-publish/main.go).

📝 Suggested fix
- sender                  size    sha256(msg)
- 34.127.26.15:33212      119     03fb89f1791f9bd70fa959a8acbae9dd...
+ sender\tsize\tsha256(msg)
+ 34.127.26.15:33212\t119\t03fb89f1791f9bd70fa959a8acbae9dd...

Also applies to: 219-222

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/rlnctest.md` around lines 165 - 168, The TSV examples in the
documentation are space-aligned instead of using real tab separators, which
makes them inconsistent with the actual TSV header format used by
grpc_p2p_client/cmd/multi-publish/main.go. Update the sample rows in the docs so
the values are separated by literal tab characters, and make the same correction
in the other referenced TSV block as well; keep the examples aligned with the
sender, size, and sha256(msg) fields.

Source: Path instructions

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.

2 participants