docs: add rlnc test documentation#71
Conversation
📝 WalkthroughWalkthroughA 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)
✅ Passed checks (7 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.mdmarkdownlint-cli2 wrapper config was not available before execution Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
docs/rlnctest.md
| ```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 |
There was a problem hiding this comment.
🧩 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.
| 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: |
There was a problem hiding this comment.
maybe can add hash as example too (e.g. v0.0.1-rc13 or bd8c0b8)
|
|
||
| Run 50 local nodes: |
There was a problem hiding this comment.
navigate to optimum-infra/optimump2p-native/
| Run 50 local nodes: | ||
|
|
||
| ```bash | ||
| ./run-local 50 |
There was a problem hiding this comment.
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
| ## Step 7 — Verify All Nodes Are Running | ||
|
|
||
| ```bash | ||
| ./run-local list |
| ```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 |
There was a problem hiding this comment.
this file doesn't exist, just use make build should be fine
|
|
||
| --- | ||
|
|
||
| ## Publisher |
There was a problem hiding this comment.
we should move subscriber on the top before doing any publish
| -sleep 500ms -topic test-topic | ||
| ``` | ||
|
|
||
| Verify that message hashes in `test-outgoing.txt` appear in `test-incoming.txt`. |
There was a problem hiding this comment.
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.
| **Terminal 1 — start the subscriber:** | ||
| ```bash | ||
| ./p2p-multi-subscribe \ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
grpc_p2p_client/local.ips.tsvis excluded by!**/*.tsvand included by none
📒 Files selected for processing (1)
docs/rlnctest.md
| ```tsv | ||
| sender size sha256(msg) | ||
| 34.127.26.15:33212 119 03fb89f1791f9bd70fa959a8acbae9dd... | ||
| ``` |
There was a problem hiding this comment.
🎯 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
Summary by CodeRabbit