sharechain/v37: MRR roundabout round-buffer base library - #84
Merged
Conversation
V37 base data structure per the v1.0 design doc (all OQ/S decisions resolved): multichain lane container, MRR roll-up pyramid (OQ-5 default geometry), epoch-scaled incremental decay accumulators with exact epoch-boundary rebuild (OQ-2), PayoutDescriptor v1 identity canon (OQ-3, S-1/S-2/S-3), quantized whole-bucket window eviction (OQ-1), reorg journal D=64 with full-rebuild fallback (OQ-7), canonical lane digest with F-1 raw-work leaves (OQ-4), Q62 fixed-point model. Header-only, stdlib-only, namespace v37; standalone test suite with an independent full-scan reference implementation as the consensus gate: 100338 checks, 0 failures (g++ 13.3 -O2 and ASan/UBSan). Range pinning, spec errata, and CI follow-ups in src/sharechain/v37/IMPLEMENTATION-NOTES.md.
The v37 unit test is registered via add_test(NAME v37_test) but the Linux x86_64 Build-tests and ASan steps compile an explicit --target list that omitted v37_test. CTest therefore registered the test but the executable was never built, yielding test #34 (Not Run) and a failing ctest exit. Add v37_test to both the build_ci and build_asan target lists. Isolated to the v37 module wiring; no source or other-target changes.
The parse-properties #204 invariant (totalPrimary is always a finite number) failed under fast-check: individual miner amounts are guarded finite via num(), but the fallback reduce-sum overflows to Infinity when amounts approach Number.MAX_VALUE. Wrap both fallback sums (parseNewShape + parseLegacyShape) in num() so an overflowed total clamps to a finite 0 instead of Infinity.
This was referenced Jun 12, 2026
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.
V37 base data structure per the v1.0 design doc (the/docs/c2pool-v37-mrr-roundabout-buffer.md). Header-only, stdlib-only, namespace v37.
Implements: multichain lane container, MRR roll-up pyramid (OQ-5), epoch-scaled incremental decay accumulators + exact epoch-boundary rebuild (OQ-2), PayoutDescriptor v1 (OQ-3, S-1/2/3), quantized whole-bucket eviction (OQ-1), reorg journal D=64 with full-rebuild fallback (OQ-7), canonical lane digest with F-1 raw-work leaves (OQ-4), Q62 fixed-point model.
Tests: standalone suite with an independent full-scan reference implementation as the consensus gate — 100338 checks, 0 failures (g++ 13.3 -O2 and ASan/UBSan).
Replaces the single-sharechain DensePPLNSRing / p2pool skiplist with the multichain, multi-temporal-level structure (V37 drops p2pool compat). Range pinning + CI follow-ups in src/sharechain/v37/IMPLEMENTATION-NOTES.md.
Draft for review — merge HELD for operator approval.