feat(antnode): simulate replication and check if records are being st…#3286
Closed
RolandSherwin wants to merge 7 commits intomaidsafe:mainfrom
Closed
feat(antnode): simulate replication and check if records are being st…#3286RolandSherwin wants to merge 7 commits intomaidsafe:mainfrom
RolandSherwin wants to merge 7 commits intomaidsafe:mainfrom
Conversation
abe9d96 to
e2f7369
Compare
maqi
reviewed
Nov 4, 2025
e2f7369 to
728b2d7
Compare
maqi
requested changes
Nov 5, 2025
Member
maqi
left a comment
There was a problem hiding this comment.
Put in Request changes as showing different result to the testnet runs
49a4cf8 to
93ee2cc
Compare
maqi
requested changes
Nov 6, 2025
Member
maqi
left a comment
There was a problem hiding this comment.
best make the test to be executed as a separate CI run, so that the results can then be seen more explicitly.
|
|
||
| // Select payment targets based on mode | ||
| let paid_nodes: Vec<PeerId> = match payment_mode { | ||
| PaymentMode::SingleNode => { |
Member
There was a problem hiding this comment.
all candidates that got picked in the payment, even they got 0 paid, shall still accept the upload.
hence here, all 5 shall be included in the payment. otherwise will result in rejection of NotInPaymentList
cb7c094 to
872893f
Compare
…ored at the right location
- Replace middle-range fallback in is_in_range with simple farthest peer distance comparison to match production behavior - Add majority accumulation requiring 2+ peers to report same record before storing (matches production consensus requirement) - Fix closest peers self-inclusion to exclude self where production does - Remove unused REPLICATION_FACTOR constant - Update statistics output with simplified in-range metrics and new majority accumulation tracking
- Add SimulationExport structs for JSON serialization of results - Export simulation config, round data, and coverage stats to JSON - Add ASCII progress bars for coverage visualization - Add coverage distribution histogram with bar charts - Add storage distribution percentile visualization (min/p25/median/p75/max)
- Add configurable failure rate (10% default) to simulate node failures - Inject failures between replication and verification phases - Calculate fault tolerance metrics: data loss rate, critical risk rate, mean coverage, std dev, p1 coverage, and theoretical survival probability - Include fault tolerance metrics in JSON export and terminal output
Split the large simulate_replication.rs file into organized modules: - config.rs: Constants and simulation configuration - counters.rs: Global atomic counters for statistics - types.rs: Core data structures and ReplicationAccumulator - node.rs: SimulatedNode implementation - stats.rs: UploadStats and CoverageStats helpers - export.rs: JSON export structures - mod.rs: Main test function and report generation
Add multi-trial simulation capability with 95% confidence intervals: - Extract single trial into reusable run_single_trial() function - Add run_monte_carlo_simulation() that runs configurable trials - Export results to monte_carlo_results.json with CI statistics - Reset counters between trials for accurate per-trial metrics - Restructure test modules for proper Rust 2018+ module paths
872893f to
93295ca
Compare
Member
|
Simulation somehow outdated and no longer necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.