Repository navigation
3.x.x: #474 A: direct-settlement recipients, signed audit bundle checks, owning-wallet spends and a nightly 1,001-recipient chunk-boundary case - #607
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closed
17 tasks
…block's signed audit bundle, spend with the owning wallets, and run 1,001 recipients across the fanout chunk boundary nightly (#474) #474 A. The weighted-recipients fixture now: - runs a per-PR direct-settlement (CTV off) case: six addresses from six wallets, unequal weights, carry below the floor and the pool fee's dust sweep, through three blocks; - verifies every found block's signed audit bundle against the chain's coinbase with the pinned test keys and compares its window weights, accounts, pool fee, coinbase outputs and CTV partition with the independent model, refusing missing, extra, doubled or moved credit; - spreads payee addresses over several wallets and spends the smallest direct output and the smallest output of each fanout with the wallet that owns it; - adds a nightly case with 1,001 payable recipients: 999 seeded through Ledger::append, 4 submitting over Stratum (2 both), paid across fanout chunks of 1,000 and 1, reporting seeded and submitted counts separately. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Anatolie
force-pushed
the
Anatolie/474-a-recipients
branch
2 times, most recently
from
September 30, 2026 19:47
c22c662 to
098d4d1
Compare
…a slow run says where its time went (#474) The per-PR CTV case took 346.8 s on its first CI run against 50-103 s on 3.x.x and 55 s locally; the summary could not say which phase grew. Each case now prints the monotonic wall clock of every phase (ramp, wallets and servers, rounds, model and audit, maturity, fanouts, receipts, spends) before its scenario checks, so a failing run reports them too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e049e4b39e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
djh58
added a commit
that referenced
this pull request
Sep 30, 2026
Resolves live_weighted_recipients.rs against #607: its Policy, Payees and the ctv and wallets fields stay, with #553's visibility, the opened-count context and the connection-limit raise. The raise moves to start_servers_for, so #607's 1,001-recipient case keeps start_servers as it was, and #553's 2,000-wallet shape takes ctv and 8 wallets like the other CTV shapes.
Anatolie
added a commit
that referenced
this pull request
Sep 30, 2026
… as the submit path records it, and check every share records it (#474) #607 review (discussion_r4148698096): the seeded shares recorded the candidate height from getblocktemplate, while the production submit path and bootstrap share record template_parent_height(candidate), one lower, as live_ctv_cpfp.rs does. They now record the parent height, and check_sources requires every accepted share, seeded or submitted over Stratum, to carry the found block's parent height. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Anatolie
added a commit
that referenced
this pull request
Sep 30, 2026
… as the submit path records it, and check every share records it (#474) (#624) #607 review (discussion_r4148698096): the seeded shares recorded the candidate height from getblocktemplate, while the production submit path and bootstrap share record template_parent_height(candidate), one lower, as live_ctv_cpfp.rs does. They now record the parent height, and check_sources requires every accepted share, seeded or submitted over Stratum, to carry the found block's parent height. Co-authored-by: Claude Opus 5.5 <[email protected]>
25 of 40 tasks
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.
Refs #474 (slice A).
What
Extends the real-node weighted-recipients fixture (
crates/qbit-prism-server/tests/support/live_weighted_recipients.rs, #524) to close slice A's gaps. Test-only: no production code changes.Direct settlement (CTV off), per PR. New
real_weighted_recipients_pay_exact_direct_outputs_without_ctv: six addresses, each generated by its own wallet, with unequal weights (two whales, a Zipf tail, a payee paced just under the floor, a near-zero payee), through three blocks with the pool fee's dust sweep. The model has a direct-mode branch: every payable recipient is a coinbase output, and there are no chunks or fanout fees.Signed audit proof. For every found block, in all three cases, the test fetches
/audit/blocks/{hash}/bundle(alternating servers). It verifies the bundle withverify_audit_bundle_against_coinbase_tx_hexagainst the node's coinbase, and pins the ledger key (seed 22) and the coinbase-manifest key (seed 11). It then compares the bundle with the independent model: window entitlements, every miner account (gross, prior, candidate, on-chain, settlement fee, carry, action), the pool-fee account and manifest (earned, swept, amount), direct coinbase credit by account, covenant outputs, and under CTV the settlement mode, direct recipients, the per-chunk fanout recipients and the committed fanout txids. The mined fanouts must equal the committed txids.compare_creditrejects missing, extra, double-credited and moved/renamed credit, and a unit test checks each of those failures.Owning wallets. Payee addresses are spread round robin over several wallets (6 in the direct case, 8 in the 40- and 130-payee cases, 16 in the 1,001 case). Each wallet must hold exactly what its own addresses were paid. For every block the test spends the smallest direct payee output and the smallest payee output of each fanout, using the wallet that owns it.
1,001 payable recipients across the 1,000-recipient chunk boundary, nightly. New
#[ignore]recipient_boundary::nightly_1001_recipients_cross_the_fanout_chunk_boundary_to_spent_outputs(support/live_recipient_boundary.rs), registered intest/prism-nightly-gated-tests.txt.r474-a-1001-recipientsintest/e2e-scenarios.tomlmoves from L4 tonightlywithruns = true. How the accepted work arrived is reported by source:Ledger::append(writerseed-474), before the servers start. Weights are 1–4 units.The ledger's attribution is checked by source and writer. All 1,001 recipients are paid across fanout chunks
[1000, 1], with the pool fee as a direct output. The audit bundle matches the model, and one output of each chunk is spent by its owning wallet.Registrations: the direct test is in
test/prism-gated-tests.txt, with a new running scenarior474-a-direct-recipients-share-to-spend.Local evidence (SHA in the PR head; PG 16.15, qbit 1.0.0 via
install-prism-qbit.sh, debug build, 22-core host shared with other workers)6 payees on 11 workers submitted 300 accepted shares …; 3 blocks …; direct outputs [4, 6, 5], fanout recipients [0, 0, 0], 5 payees paid, sub-floor accounts [2, 1, 2] (1 later paid, 807155 bits swept …), 3 signed audit bundles matched the model, 3 payee outputs spent by 2 owning wallets: 30.5 s… 4 signed audit bundles matched the model, 8 payee outputs spent by 4 owning wallets: 59.8 s (49.7 s before this change on the same host)credit_comparison_refuses_missing_extra_double_and_moved_credit: okexecuted1001 payable recipients in 16 wallets; accepted work: 999 seeded shares for 999 recipients through Ledger::append (writer seed-474), 12 shares (0 stale retries) submitted over Stratum by 4 recipients in 4 live sessions on both servers, 2 recipients with both; one block, window of 1010 shares, not cut; 1001 recipients paid 584139..2920694 bits, direct outputs 1, fanout chunks [1000, 1], 29683785 bit pool fee; the signed audit bundle matched the model; 2 payee outputs (one per chunk) spent by 2 owning walletslive-nightlyjob has a 60 min timeout; its recent scheduled runs took 13–21 min.executed …::recipient_boundary::nightly_1001_…Also:
python3 scripts/check_e2e_scenarios.py(ok),python3 -m unittest tests.test_check_e2e_scenarios tests.test_check_gate_manifest(34 ok),cargo clippy -p qbit-prism-server --test live_regtest -- -D warnings(clean),cargo fmt --check -p qbit-prism-server(clean).CI (required integration shard 1, head
cbc021f): direct 28.5 s; per-PR CTV 243.2 s, of which maturity mining took 167.8 s. On the first head the per-PR case took 346.8 s, and 3.x.x's recent runs of the unchanged test took 50–103 s. Locally, pinned to 4 CPUs, maturity mining took 2.2 s with 1 payee wallet and 2.3 s with 8, and the 8 wallets add about 5 s overall. So the CI maturity time looks like runner variance rather than this change. Each case now prints its wall clock by phase, so a slow run shows where the time went.Not run locally: the full
live_regtestbinary and the other nightly variants. The 1,001 case has not yet run on the Blacksmith nightly runner; it will run in the next scheduled nightly.🤖 Generated with Claude Code