Repository navigation
3.x.x: drive a real regtest qbitd from qbit-prism-load, ramped to the fake node's difficulty and reconciled against the chain (#547) - #590
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
… fake node's difficulty and reconciled against the chain (#547) `--node qbitd` runs the harness's existing phases, share reconciliation and exit codes against a managed pair of regtest qbitd nodes instead of the in-process fake. The frontends reach pool node A through a recording JSON-RPC relay. Peer B, which A connects to as #530's PeerNode does, mints every external tip with generatetoaddress. The chain is ramped first, as #524 does. -legacyretarget epochs on qbit regtest are 1,440 blocks, each clamped to 4x, so eight retargets reach bits 1e7fffc0 at height 12,960. That is the fake node's 1e7fffff to 0.0008%, so the window, share difficulty and hashes per share are the fake run's. Two node rules shape the clock: qbit refuses a block about ten minutes ahead of its clock, and it serves a template more than 150 s after the tip at the regtest limit. So the ramp's shared mock clock ends at wall time, the clocks are then cleared, and B mints a keepalive once the tip's own timestamp is 120 s old. The timestamp matters because a pool block carries its job's template time. The 1,439 blocks before the next retarget are headroom, checked at entry. A share is a block with probability 8 / window whatever the ramp, so a phase at R shares/s implies an own block every W / (8R) seconds. Real-node mode refuses a phase outside 9-600 s and reports the band, each phase's interval and the stepped-over block solutions under node.cadence_band. --plan short at its defaults implies one every 50 s. A watcher on A stamps every tip change: a waitfornewblock long-poll given the last tip, then a height walk. The relay records each submitblock verdict verbatim in the fake node's submission shape. After the load, every block above the ramp must be exactly one peer mint or one accepted submission, on A's active chain, at the ramped bits, with every template at those bits. Any disagreement is a contradicted premise (exit 8); a node that exits is an abort (6). Provenance checks are unchanged; artifact_kind is always example (#487 decision 1). Fake-node mode is unchanged. Its code path is not edited, real-node report keys appear only in real-node runs, and presets gain "--node": "fake". fake_node_mode_is_unchanged checks the fake node's answers to a fixed RPC corpus and a pr-smoke frontend's environment against goldens taken before this change; load_smoke checks the side report's key sets against a third. The tips plan now schedules --scheduled-blocks in its warm-up, its only phase; before, it silently scheduled none. The gated real_node_smoke_reconciles_against_postgres_and_the_chain runs the new real-node-smoke preset on every PR: 50 sessions, 3 peer tips and 1 own block. short-plan-real-node and short-plan-fake-node, the bridging pair for #552, run nightly: the load harness's preset jobs now install the pinned qbit, as the live-nightly job does. Review fixes. The peer link is kept against qbit's peer timeouts with a very large -peertimeout (the ramp's message stamps are taken under a mock clock that starts about 36 minutes in the past), and a lost link is named: peer-to-peer logging goes on after the ramp, a disagreement adds both nodes' peers and chain tips to node.chain_reconciliation, and the smoke test prints that and the nodes' post-ramp logs when it fails. A mint first waits (10 s at most) for B to hold A's tip, so it never forks a pool block still on its way. The relay forwards and records in its own task, so a frontend that gives up on a request cannot lose the record of a block A took. A rejected submitblock verdict (anything but acceptance, duplicate or inconclusive), an unreadable submit and a tip asked of B but never minted are problems. A node that exits or can no longer be reached aborts the run (exit 6) instead of becoming a contradiction (8). Tips are stamped when B minted them or A answered the submit, if earlier than the watcher's wake-up. A failed start and an early drop remove the data only after both nodes are dead. QBITD_BIN is read through the test gate's name for it, and the runner-probe preset pins "--node": "fake". Closes #547 Co-Authored-By: Claude Opus 5.5 <[email protected]>
djh58
force-pushed
the
djh58/prism-b547-real-node
branch
2 times, most recently
from
September 29, 2026 19:31
7dc2093 to
1805c88
Compare
This was referenced Sep 29, 2026
Member
Author
Review ledger: head ee1ac6d (CI green)Reviews run: CI failures on the first head (3978278)
Review findings
Verification. All run locally:
The mutants for items 4 and CI1 are above. Per-PR CI cost is unchanged: about 85 s on the shard (ramp 27–41 s). 🤖 Generated with Claude Code |
3 tasks
djh58
added a commit
that referenced
this pull request
Sep 29, 2026
Brings in #590's real-node mode and resolves where it meets the soak: - run.rs execute_with_preset: #590's node_mode and args rebinding first, then the soak plan over the rebound args. - run.rs side report: #590's node_block, plus the soak entry. - run.rs block scheduling: #590's rule (the tips plan lands its scheduled blocks in warm_up, every other plan in steady_state) is kept, on the phase's kind rather than its name, as holds_scheduled_blocks. A soak's c<cycle>.<preset>.<kind> phases therefore land their looped preset's blocks where that preset would, and each segment refreshes its block budget on the same rule. soak_plan asserts the weekly soak's 26 landings. - launch_environment's map is bound mut for the soak's PRISM_SHARE_PARTITION_ENSURE_INTERVAL_SECONDS, inserted only when a soak runs; the fake-node frontend environment golden is unchanged. - The soak presets pin --node fake, as #590 requires of every preset. --node qbitd refuses --plan soak by name: the looped segments are parsed from fake-node presets. - The fake-node side report key golden gains the soak key. - README preset table and test/prism-gated-tests.txt keep both sides, the gated list sorted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 30, 2026
Anatolie
added a commit
that referenced
this pull request
Sep 30, 2026
…596, #588, #597) Adds #588's Saturday 5.5 h soak schedule and its live-nightly step that runs every listed test binary, so qbit-prism-load::soak_smoke runs beside the live_regtest variants, and #597's L6 shipped-images lane on the Sunday schedule. Byte-identical to 3.x.x at 1932cb3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 1, 2026
Anatolie
added a commit
that referenced
this pull request
Oct 16, 2026
(#590, #596, #588, #597, #552, #551, #553, #554) (#601) * main: sync the PRISM load-harness nightly workflow from 3.x.x (#590, #596) Co-Authored-By: Claude Opus 5.5 <[email protected]> * main: sync the PRISM load-harness nightly workflow from 3.x.x (#590, #596, #588, #597) Adds #588's Saturday 5.5 h soak schedule and its live-nightly step that runs every listed test binary, so qbit-prism-load::soak_smoke runs beside the live_regtest variants, and #597's L6 shipped-images lane on the Sunday schedule. Byte-identical to 3.x.x at 1932cb3. Co-Authored-By: Claude Opus 5.5 <[email protected]> * main: re-sync the PRISM load-harness nightly workflow from 3.x.x (#552, #551, #553, #554, #582) The file is 3.x.x's copy byte for byte again, as of 3.x.x c95febb; the last change to it there is bd1ddeb (#663). Since 1932cb3 (#597), five 3.x.x changes landed in it: - #552 (#613): the `bridging` job runs the short plan on the fake and the real node on one runner, nightly, on the run-load label and on a dispatch with the new `bridging` input. - #551 (#606): every preset job builds a trend row; on a schedule the `evidence` job (the one job with `contents: write`) appends the rows to the orphan `ci-evidence` branch, applies the report-only regression rule, promotes the soak's and flagged runs' bundles to the rolling `ci-evidence/YYYY-MM` pre-release, and keeps one `prism-load-regression` issue. PR and dispatch runs get the read-only `evidence-preview` instead. - #553 (#618): the live nightly and weekly lists gain the chain-event scenarios under 2,000 sessions; the workflow's comments say so. - #554 (#635): the run job installs fuse2fs and fuse3 for a preset whose faults fill the WAL volume (faults-long-real-node, Saturday). - #582 (#663): comment only. Without this, main's scheduled copy (#595) still has no qbitd install step, so every `--node qbitd` preset fails with "--node qbitd needs --qbitd-bin or QBITD_BIN" (scheduled runs 37188928798 and 37287515779). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Robert Clarke <[email protected]>
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.
Closes #547 (#487 S8). This extends the existing load harness to drive a real regtest
qbitd, following the design note agreed on #547. There is no new load generator and no server change.What it does
--node qbitd(defaultfake) and the operational--qbitd-bin(defaultQBITD_BIN) run the same phases, share reconciliation and exit codes against a managed pair of regtest nodes:-listen=0) is reached by the frontends through a recording JSON-RPC relay. Peer B (-listen=1), which A connects to as 3.x.x: live two-node regtest scenarios for a lost same-height race and a deep reorg with own blocks on both branches (#521 scenarios 1 and 2) #530'sPeerNodedoes, mints every external tip withgeneratetoaddress. Both use thelive_regtestlauncher's arguments plus-legacyretarget.PRISM_MIN_PEERS=1is met by a real peer, and the frontends getQBIT_CHAIN=regtest.1e7fffc0at height 12,960, which is the fake node's1e7fffffto within 0.0008%, so the window, share difficulty and hashes per share match the fake run. The ramp took 25–40 s on a loaded host.node.cadence_bandstates the band, each phase's interval, and how many block solutions the miners stepped over against how many were expected.--plan shortat its defaults implies one own block every 50 s.waitfornewblocklong-poll that is given the last tip, then walks the heights so no block is skipped.submitblockwith the node's verdict verbatim, in the fake node's submission shape, so the dense-cadence and landing reports read it unchanged.artifact_kindis alwaysexample(3.x.x: End-to-end and load testing in CI on Blacksmith runners: real qbitd regtest mining, ephemeral PostgreSQL, many wallets #487 decision 1).versions.qbitd_*,premise.node_*and the real node's keys undernode, but only in real-node runs.Fake-node mode is unchanged
"--node": "fake"; that one line is their only change.fake_node_mode_is_unchanged(an ordinary test, needing nothing) compares against goldens taken on the base commit: the fake node's answers to a fixed RPC corpus (plain and retargeting) and a pr-smoke frontend's launch environment.load_smokealso checks the side report's top-level,versions,topology,windowandnodekey sets against a golden.One harness behaviour changed outside real-node mode: under
--plan tips,--scheduled-blocksis now scheduled in warm-up, the plan's only phase. Before, it silently scheduled none. No checked-in preset combined the two.Tests
real_node::real_node_smoke_reconciles_against_postgres_and_the_chain(gated:QBITD_BIN,PRISM_TEST_PG_BIN_DIR)real-node-smokepreset: 1 debug frontend, 50 sessions, 20 shares/s over 20k, 3 peer tips and 1 own block in a tips plan. It checks exit 0, the chain reconciliation (1 pool block and 3 or more external blocks), every template at1e7fffc0, every session served on every tip, and that the cadence band is statedreal_node::fake_node_mode_is_unchangedload_smoke(existing)The gated id is listed in
test/prism-gated-tests.txt.test/e2e-scenarios.tomlgainsreal-node-harness-smoke(pr) andreal-node-short-plan-pair(nightly), andbridging-fake-and-real-nodenow points at the pair.Mutants, each run against the gated test file:
fake_node_mode_is_unchangedfails at/0/answers/20/result/chainwork.--plan shortagainst the real node (short-plan-real-node, release binaries, clean tree, loaded 2 vCPU-class host):slow_database), all at1e7fffc0.submitblocktook 4.4 ms through the relay;getblocktemplatep50 0.36 ms and p99 0.64 ms.short-plan-fake-node) on the same host also exits 0.slow_database, which is ungated in both presets, is equally degraded on both there, so that is the host and not the node.Nightly.
short-plan-real-nodeandshort-plan-fake-noderun nightly on 8 vCPU.prism-load-nightly.yml's preset jobs now restore and install the pinned qbit release, exactly as its live-nightly job already does. The install script exportsQBITD_BIN, which is where a real-node preset findsqbitd. Fake-node presets ignore it. Reporting the difference between the two runs is #552's job.For S12, S15, S16 and S18
--recipientsis refused in real mode until 3.x.x: Chain-event scenarios under session load (L4) (#487 S15) #553 adds node-issued addresses and a share filter over them.qbit-prism-load(#487 S8) #547.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.