Skip to content

3.x.x: live regtest: a dense-cadence soak lands every found block, rebuilds in budget and holds RSS flat (#521 scenario 5) - #540

Merged
djh58 merged 1 commit into
3.x.xfrom
djh58/prism-b521-dense-soak
Sep 28, 2026
Merged

djh58 merged 1 commit into
3.x.xfrom
djh58/prism-b521-dense-soak

Conversation

@djh58

@djh58 djh58 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Refs #521 (scenario 5: dense-cadence landings and a soak).

What

One new nightly-only case in live_regtest (tests/support/live_dense_soak.rs, registered as dense_soak_tests), plus its id in test/prism-nightly-gated-tests.txt. The load-harness nightly's live-nightly job runs that list with --ignored --exact and proves it with the gate manifest. Shared support is untouched apart from the three-line mod registration. The workflow change is a comment only: the job reads the list from the ref it checks out.

Two throttled CPU miners, one on each server, mine the regtest node's easy target, so the pool's own blocks land a few seconds apart. Every landing bumps the payout revision the other server's work was built on, which is the #478 path. The test runs for PRISM_DENSE_SOAK_SECONDS (default 600). It asserts:

  • Every found block is captured. Every block the pool found on live work is a candidate. Live work means an accepted share outside stale grace whose hash meets the network target. The exception is a race already lost when the block was found: the block that won its height had been captured before the share was accepted.

  • Every candidate settles. It ends in one of three states:

    • submitted on the node's active chain;
    • orphaned;
    • abandoned before its offer only because its parent was superseded by a landed pool block at its height.

    Every block on the chain since the soak began is a confirmed pool block.

  • Rebuilds stay within budget. Each server's qbit_prism_accepted_block_to_revision_work_seconds p99 (3.x.x: Landing-phase metrics — time from block acceptance to new-revision work, with the alerts 2.x.x had #458) stays within PRISM_DENSE_SOAK_REBUILD_P99_SECONDS (default 5), with no degraded landing.

  • RSS stays flat. Each server's RSS median over the last fifth of the soak is within a quarter, plus 32 MiB, of its median over the second fifth.

After the miners stop, seven blocks that are not the pool's bury the last landings past the orphan depth, so a race lost at the very end is proven before the candidates are read.

Verification

🤖 Generated with Claude Code

…builds in budget and holds RSS flat (#521 scenario 5)

Two throttled CPU miners, one on each server, mine the regtest node's easy
target, so the pool's own blocks land a few seconds apart. Every landing
bumps the payout revision that the other server's work was built on (the
#478 path). They run for PRISM_DENSE_SOAK_SECONDS (default 600). The test
is #[ignore], nightly only: it is added to test/prism-nightly-gated-tests.txt,
which the load-harness nightly's live-nightly job runs and proves with the
gate manifest.

It asserts four things:
- Every block the pool found on live work is a candidate. Live work means
  an accepted share outside stale grace whose hash meets the network
  target. The exception is a race already lost when the block was found:
  the block that won its height was captured before the share was
  accepted.
- Every candidate settles. It ends submitted on the node's active chain,
  orphaned, or abandoned before its offer only because its parent was
  superseded by a landed pool block at its height. Every block on the chain
  since the soak began is a confirmed pool block.
- Each server's accepted-block-to-revision-work p99 (#458) stays within
  PRISM_DENSE_SOAK_REBUILD_P99_SECONDS (default 5), with no degraded landing.
- Each server's RSS median over the last fifth of the soak is within a
  quarter, plus 32 MiB, of its median over the second fifth.

After the miners stop, seven blocks that are not the pool's bury the last
landings past the orphan depth. A race lost at the very end is therefore
proven before the candidates are read.

Refs #521

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@djh58
djh58 requested a review from kiwidream September 28, 2026 19:47
@djh58

djh58 commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

Review ledger (head 8299ec2b, CI green)

CI. All 20 checks pass. The soak is #[ignore] and runs only in the nightly live-nightly job, so it adds nothing to PR CI. The PR gate list is unchanged.

Review (/code-review, low). No findings. The review read the non-test hunks, which are a workflow comment and a README sentence. The test file itself was checked locally, as below.

Findings from building the test, and what the assertions now say.

# What the soak surfaced Resolution
1 Accepted block solutions outnumbered candidates. A solution on a tip already replaced is accepted under stale grace, and that is no block to land Candidates are checked against accepted shares outside stale grace whose hash meets the network target
2 A live-work block that was never captured: the other server's block at the same height had been captured about 1 s before this share was accepted Allowed only as a race already lost when the block was found: the height's winner must have been captured before the share was accepted. Any other uncaptured block fails
3 Candidates ending abandoned with parent superseded, about 100 ms after capture By design (coordinator.rs: "a genuine parent change abandons"). Allowed only with that reason and a landed pool block at the height; payout revision or parent superseded (#478 capture off) fails
4 reconciliation rows at the end: races lost at the very end need 6 confirmations to be proven orphaned Seven blocks that are not the pool's bury the last landings after the miners stop, before the candidates are read

Local verification (pinned qbitd, private PostgreSQL 16 with fsync on, required-integration mode):

  • The live-nightly command over all three listed variants passes, and check_gate_manifest.py confirms all three executed.
  • Soak runs at 120 s: 41-47 blocks landed, one every 2.6-2.9 s. Every live-work block was captured. Revision-work p99 was at most 0.5 s on both servers, and RSS stayed flat at about 38-40 MB.
  • Mutant: a server that leaks 4 MiB per accepted share fails the soak (server 0 RSS 73 -> 135 MiB against a 124 MiB ceiling).

@djh58
djh58 merged commit 273f5c0 into 3.x.x Sep 28, 2026
21 checks passed
djh58 added a commit that referenced this pull request Sep 28, 2026
…540) (#567)

Brings prism-load-nightly.yml on main up to date with its copy on 3.x.x.
The two files are now byte-identical:
- #559: the plan job pins one commit for the whole matrix, a single build
  job shares the release binaries, and the preset names change;
- #540: scenario 5's dense-cadence soak joins the live-nightly list, with a
  comment-only change here.

Refs #521

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant