bump CDK to 0.17.0 at vnprc/cdk 7011eebc (NUT-XX mint quote lookup) #8
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/nutxx-lookup-cdk-017"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
All hashpool binaries move from CDK 0.16.0 (cashubtc/cdk 1572941d) to CDK 0.17.0 at vnprc/cdk 7011eebc, branch fix/nutxx-lookup: upstream main plus the new NUT-XX quote lookup. The branch is current with master including the bitcoind-gunix revert (PR #9), so the dev stack starts from the prebuilt Core path without recompiling Bitcoin.
devenv upmining smoke test remains a human gate, as with prior CDK bumps.Closes vnprc/hashpool#7. Paired PR: vnprc/cdk-ehash#4 must merge first — this PR pins its commit.
Changes
protocols/Cargo.toml,roles/Cargo.toml:[patch.crates-io]→vnprc/cdkrev7011eebcfor all cdk crates (was cashubtc/cdk1572941d, 0.16.0).protocols/ehash,roles/mint,roles/translatorCargo.toml: cdk version reqs0.16.0→0.17.0.roles/mint/Cargo.toml: cdk-ehash rev40fdebe→1328180(the paired cdk-ehash bump to the same CDK rev, branchagent/nutxx-cdk-017).devenv.nix:cdkRepo/cdkCommit→ vnprc/cdk7011eebc…; thebuild:cdk:clitask now interpolates those variables instead of hardcoding a second copy of the URL and commit, so future bumps touch one place.scripts/patch-cdk-path.sh: pin-line matcher broadened togithub.com/(cashubtc|vnprc)/cdkso the local-path patcher keeps working after the source move (it would silently no-op otherwise).protocols/ehash/src/quote.rs:MintQuoteCustomRequest.amountbecameOption<Amount>upstream — the sole code break in all of hashpool; construction site and test assert wrapped inSome(...).roles/Cargo.lock: re-resolved. cdk crates to 0.17.0/7011eebc; three new transitives from upstream's wallet work (bdk_electrum, electrum-client, bitreq); no other pin movement — in particular the MSRV-sensitivetime0.3.41 /serde_with3.17.0 /darling0.21.3 /simple_asn10.6.3 pins are preserved, which is what keeps the workspace building on devenv rustc 1.86.4147fec4brings in master's bitcoind-gunix revert (PR #9); the PR's diff against master is unchanged by it.Risk
1572941d..7011eebc) are absorbed on compile evidence, test suites, and targeted wire-contract diffs. Runtime behavior changes inside CDK internals (quote state machine timing, payment processor scheduling) are not exercised by unit tests; that residual risk is carried to the human-gateddevenv upsmoke test.GET /v1/mint/quote/ehash/{quote_id}with a locally defined response struct. Verified by source diff at both revs: route unchanged, response keepsamount/amount_paid/amount_issued(it gainsmethodandupdated_at, which serde ignores). The quote-creation, sweeper, and signatory paths go through cdk's own typed APIs and are covered by the compile.protocols/Cargo.lockfails devenv's rustc 1.86 MSRV on any current tree, master included — pre-existing landmine, not introduced here; evidence and workaround in vnprc/hashpool#10.devenv upbuilds only the roles workspace and is unaffected.fix/nutxx-lookupis a moving branch on vnprc/cdk; the rev pin keeps builds reproducible, but the branch must not be deleted or rebased away until the work lands upstream. Same for cdk-ehash rev1328180, which is on branchagent/nutxx-cdk-017until vnprc/cdk-ehash#4 merges (merge keeps the commit reachable).devenv.lock(1.6.1) and printsError: TasksNotFoundfor thecreate:dirs/build:cdk:clibefore-hooks on shell entry; shell and cargo runs work regardless. Worth watching on the firstdevenv up;devenv updatewould sync the input but is a separate change.Validation
Under the real devenv shell on the merged branch (rustc 1.86.0 + cargo 1.86.0 — the reverted
devenv.lock's toolchain; entering the shell takes seconds again now that gunix is gone):cargo check --manifest-path protocols/Cargo.toml --all-targets: clean.cargo test: 55 passed, 0 failed. (Standalone protocols builds need a lock predating thetime0.3.55 releases or the #10 workaround pins; the committed roles lock is unaffected.)cargo check --manifest-path roles/Cargo.toml --all-targets: clean.cargo test: 218 passed, 0 failed across 51 test binaries.bitcoin-node.nix/bitcoind.nixrestored; the cdk pin edits indevenv.nixmerged intact.Earlier validation of the pre-merge branch under rustc 1.97.1 (cdk repo
nix develop .#stable, while devenv was blocked by the gunix input): same checks and suites, same results, plus cdk-ehash at1328180:cargo check --all-targetsclean, 16/16 tests.custom_router.rsroutes byte-identical between revs;MintQuoteCustomResponsefield diff shows only additions (method,updated_at).Not run (human-gated, matching prior CDK bumps):
devenv upfull-stack mining smoke; testnet4 deploy.Read-only review pass (required post-open review). No defects found; receipts for what was measured beyond the compile/test runs already in the body:
okwith an explicit failure-scan, 16/16 cdk-ehash, lock diff audited package-by-package — besides the cdk-family 0.16→0.17 moves, the only lock changes are the three added transitives (bdk_electrum 0.23.2, electrum-client 0.24.1, bitreq 0.3.7); zero version churn on any other existing package.unusedwarnings in the all-targets run are atroles-utils/mint-pool-messaging/src/lib.rs:10(tracingerror),message_hub.rs:371(testevent),mint/tests/sv2_connection_integration.rs:8(binary_sv2::Encodable) — all in files this PR does not touch, none involving cdk items, so the bump cannot have introduced them.api/v1URLs are Prometheus/monitoring, not the mint.build:cdk:clistays buildable:crates/cdk-cliexists at7011eebcwith a workspace version, so the retargeted devenv task can still build--bin cdk-cli.Owner request (2026-08-08): the bitcoind-gunix revert (PR #9) is merged to master; bring this branch up to date with that master so the stack can be started quickly for testing without recompiling Bitcoin Core. Doing this as a merge of master into the branch (PR branches take commits, no force-push), then re-validating — the branch should become devenv-realizable, so the cargo checks can rerun under the real devenv toolchain, closing the Risk note about validation having used the cdk repo shell.
Done: master (with the PR #9 bitcoind-gunix revert) merged into this branch as
4147fec4— a merge, not a rebase, so no force-push; the PR's diff against master is unchanged. The branch now starts the stack from the prebuilt Core path.Revalidation under the real devenv shell (rustc 1.86.0, the reverted lock's toolchain — shell entry is seconds again):
cargo check --all-targetsclean; 218 tests passed, 0 failed across 51 binaries. The committedroles/Cargo.lockneeded no changes — it already preserves the MSRV-critical pins (time0.3.41,serde_with3.17.0,darling0.21.3,simple_asn10.6.3), which is what keeps 1.86 viable.cargo check --all-targetsclean; 55 tests passed, 0 failed. Caveat: a fresh protocols lock resolvestime0.3.55 (MSRV 1.88) and fails under 1.86 on any current tree including master — pre-existing, filed with evidence and workaround as vnprc/hashpool#10;devenv upbuilds only roles and is unaffected.devenv up, also pre-existing on the reverted tree: installed devenv CLI 1.11.1 vs devenv input 1.6.1 indevenv.lockprintsError: TasksNotFoundfor thecreate:dirs/build:cdk:clibefore-hooks at shell entry (shell + cargo unaffected). If it bites process startup,devenv updatesyncs the input as a separate change.PR body updated to reflect the merged state and the devenv-toolchain validation (the earlier body cited rustc 1.95.0 from gunix-master's nixpkgs; the reverted lock ships 1.86.0).
Live validation of the NUT-XX lookup endpoint against this branch's mined state (2026-08-08 session: 207 ehash quotes, one NUT-20 locking key, 6,706 ehash issued across 179 quotes). Method: restarted the mint alone against
.devenv/state/mint/mint.sqlite, built a 20-line signer against the branch's ownmint_quote_lookup_msg_to_sign, probedPOST /v1/mint/quote/pubkeywith curl.What works:
updated_atpopulated. Both new migrations (updated_at backfill + pubkey index) applied cleanly on first start; all 207 rows have realupdated_atvalues.nuts.XX.supported: trueandpubkeyboth present in/v1/info(pubkey derives from the mint seed — no config needed).{"quotes":[]}(no existence oracle).Feedback candidates for the CDK PR author:
WHERE pubkey IN (...)with no state/expiry filter plus two follow-up queries per quote (payments, issuance). One mining key accrued 207 quotes in ~20 min of regtest mining; a production miner reaches tens of thousands of mostly-ISSUED quotes, all returned on every lookup. A state filter (orupdated_at > cursordelta sync — the field is already in the response) would keep this usable at scale.Failed to validate signature) — unauthenticated endpoint, so anyone can spam ERROR-level logs; debug/warn seems right.GET /v1/mint/quote/{method}/{id}) carry nostatefield — clients infer fromamount_paid/amount_issued. Worth spelling out in the NUT so wallet authors converge.Hashpool-side log review of the same session, none of it CDK-related: mint had zero runtime errors (a few
[SLOW QUERY] COMMIT21–68 ms warns under the mining burst); proxy/pool saw a 13-share stale burst (seq 86–98, new-job race) and 4×ArithmeticOverflowderiving hashrate from SetTarget (pre-existing sv1 path); jd-server EmptyMempool warns are normal regtest noise. The 27 unissued quotes should sweep on the nextdevenv up(~15 s poll) — balance should jump by 2,232 ehash.4147fec4e6to02924ec654