Skip to content

Add RPC benchmark endpoint coverage - #16

Merged
kiwidream merged 2 commits into
migrate-qbit-ci-benchmarksfrom
rpc-perf-endpoints
Jun 25, 2026
Merged

kiwidream merged 2 commits into
migrate-qbit-ci-benchmarksfrom
rpc-perf-endpoints

Conversation

@kiwidream

@kiwidream kiwidream commented Jun 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add wallet read RPC benchmark cases for low-risk wallet and wallet-listing endpoints.
  • Add raw transaction and PSBT construction benchmark cases.
  • Reuse stable wallet fixture inputs so repeated samples avoid address/keypool mutation.

Validation

  • jq empty test/functional/data/rpc_perf_manifest.json
  • python3 -m py_compile test/functional/feature_rpc_perf.py
  • Manifest builder and duplicate-id check
  • git diff --check
  • ./test/functional/feature_rpc_perf.py --help

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

Low Risk
Changes are limited to functional RPC perf test data and harness code; no node, wallet, or RPC implementation behavior is modified.

Overview
Expands the RPC performance harness with wallet read, listing, and raw tx/PSBT benchmarks on the existing wallet_ready fixture, all in the shared_name_qbit_modified lane with latency-only comparison against reference.

rpc_perf_manifest.json gains many new shared.modified.* cases (e.g. getwalletinfo, getbalance, listunspent, createrawtransaction, fundrawtransaction, decodepsbt neighbors like decoderawtransaction, converttopsbt) wired to new wallet_* call builders.

prepare_wallet_ready now labels the receive address (rpc-perf-receive), stores receive_script_pubkey for decodescript, and keeps reusing prebuilt raw_tx / psbt so warm runs do not churn the keypool or addresses.

Reviewed by Cursor Bugbot for commit 9e9020b. Bugbot is set up for automated code reviews on this repo. Configure here.

@kiwidream
kiwidream merged commit 62fd1b6 into migrate-qbit-ci-benchmarks Jun 25, 2026
1 check passed
kiwidream added a commit that referenced this pull request Jun 25, 2026
* Add scheduled performance workflows

* Add RPC benchmark endpoint coverage (#16)

* Add wallet read RPC benchmarks

* Add transaction construction RPC benchmarks
@kiwidream
kiwidream deleted the rpc-perf-endpoints branch June 27, 2026 18:43
kiwidream added a commit that referenced this pull request Nov 2, 2026
1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.

git-subtree-dir: src/libbitcoinpqc
git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 2, 2026
* Squashed 'src/libbitcoinpqc/' changes from ac72d1ffa0..1965d0da1e

1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.

git-subtree-dir: src/libbitcoinpqc
git-subtree-split: 1965d0da1eb4d9e196613b8f3a5d0d866a221c53

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* subtree: pin libbitcoinpqc v0.3.2 and test the signer stack scrub

Point every libbitcoinpqc pin at the signed v0.3.2 tag (peeled
1965d0da1e, imported in the previous commit): the subtree helper
default, the subtree check, the nightly scanner and the fuzz target
mapping, plus the docs that name the tag.

v0.3.2 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
(#14), BAD_KEY for signing with an inconsistent secret key and a new
OUT_OF_MEMORY (-6) code for allocation failures (#10), and the
RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix that qbit applied
downstream on v0.3.0, so the vendored tree now equals the tagged tree.
Drop the inert lockfile exception from the subtree check and the
scanner. qbit's callers treat any nonzero result as a failure and no
qbit test asserts a code that changed, so no caller changes. Keys,
signatures and verification results are unchanged.

The release bumps the crate to 0.3.2, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.2; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Correct the runbook's stack note: the forced RelWithDebInfo C flags
follow CMAKE_C_FLAGS on the compile line, so an -O0 in APPEND_CFLAGS
does not select the unoptimized 288 KiB burn, and every qbit build
burns 16 KiB.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the longest zeroed run below the caller is at least 12 KiB with at
most 64 bytes written below it, so no frame of the call ran below the
burn. The 64 bytes cover the burn's own prologue on i686, where
position-independent code pushes a return address below the array to
load its GOT pointer. The inspection is skipped under TSan, whose
runtime calls run below every instrumented frame, as under ASan,
HWASan, MSan and SafeStack. A 4 KiB burn fails the test.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* doc: add release notes for #268

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
kiwidream added a commit that referenced this pull request Nov 12, 2026
* Squashed 'src/libbitcoinpqc/' changes from ac72d1ffa0..1965d0da1e

1965d0da1e Release qbit-libbitcoinpqc 0.3.2 (#17)
db10f2ed1e Forward-port 0.3.1 release metadata and provenance doc to main (#16)
edcea6cb89 Make the UBSan CI steps pass and require Linux CI on main (#14)
5fdfda2f85 Set allocator_may_return_null in the ASan release smoke (#13)
d3c6a6f0ea Prove requested SHA backend implementations execute (#4)
70008b9362 Report an inconsistent secret key from sign as BAD_KEY and allocation failure as OUT_OF_MEMORY (#10)
d165da6a15 Burn released stack once per secret-key call instead of per SHA-2 block (#6)
85cda2cfa8 Zero SLH-DSA secret-key scratch before keygen/sign return (#5)
f55b86b609 Add minimal GitHub ruleset configs (#2)
d5700dad0b Add trusted CI runner label

Imported from the upstream tag v0.3.2 (signed annotated tag 81709ebe34,
peeled 1965d0da1e, tree 4cb1705), the squash merge of
Qbit-Org/qbit-libbitcoinpqc#17 onto main db10f2ed1e. git merge-tree
from the v0.3.0 tree with qbit's subtree and this tree produces the
same tree, so this is what contrib/devtools/update-libbitcoinpqc-subtree.sh
produces, and qbit's downstream v0.3.0 crossbeam-epoch lockfile patch is
part of the tag. It is committed as one squash-merge-shaped commit, the
shape test/lint/libbitcoinpqc-subtree-check.sh reads, because the
signing preview cannot display the tool's whole-tree squash commit.


Co-Authored-By: Claude Opus 5.5 <[email protected]>

* subtree: pin libbitcoinpqc v0.3.2 and test the signer stack scrub

Point every libbitcoinpqc pin at the signed v0.3.2 tag (peeled
1965d0da1e, imported in the previous commit): the subtree helper
default, the subtree check, the nightly scanner and the fuzz target
mapping, plus the docs that name the tag.

v0.3.2 is v0.3.0 plus the secret-key scratch zeroization (#5), the
once-per-call stack burn (#6), the non-wrapping secure_zero_local loop
(#14), BAD_KEY for signing with an inconsistent secret key and a new
OUT_OF_MEMORY (-6) code for allocation failures (#10), and the
RUSTSEC-2026-0204 crossbeam-epoch 0.9.20 lockfile fix that qbit applied
downstream on v0.3.0, so the vendored tree now equals the tagged tree.
Drop the inert lockfile exception from the subtree check and the
scanner. qbit's callers treat any nonzero result as a failure and no
qbit test asserts a code that changed, so no caller changes. Keys,
signatures and verification results are unchanged.

The release bumps the crate to 0.3.2, so also move the
qbit-libbitcoinpqc path-dependency entry in the two contrib/testgen
lockfiles to 0.3.2; otherwise the P2MR oracle job's
cargo fetch --locked refuses the stale lockfiles.

Correct the runbook's stack note: the forced RelWithDebInfo C flags
follow CMAKE_C_FLAGS on the compile line, so an -O0 in APPEND_CFLAGS
does not select the unoptimized 288 KiB burn, and every qbit build
burns 16 KiB.

Add pqc_secret_key_calls_scrub_released_stack. It runs keygen, import
validation, signing and HKDF derivation through CPQCKey on a painted
thread stack, then requires that no SK_SEED or SK_PRF copy remains and
that the longest zeroed run below the caller is at least 12 KiB with at
most 64 bytes written below it, so no frame of the call ran below the
burn. The 64 bytes cover the burn's own prologue on i686, where
position-independent code pushes a return address below the array to
load its GOT pointer. The inspection is skipped under TSan, whose
runtime calls run below every instrumented frame, as under ASan,
HWASan, MSan and SafeStack. A 4 KiB burn fails the test.

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* doc: add release notes for #268

Refs #260

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

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