Uh oh!
There was an error while loading. Please reload this page.
feat(custody): freeze node-side USER custody for removal (step 1 of #1701) - #321
Merged
Conversation
Step 1 of dig_ecosystem#1701. Deprecate the auth.*/custody entry points and document the #1500 ratification; delete nothing. Co-Authored-By: Claude <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Also bumps the release version to 0.142.0 (minor: deprecation is additive, nothing removed). Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
marked this pull request as ready for review
August 23, 2026 15:20
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 23, 2026
Closed
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 freeto 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.
Step 1 (FREEZE) of https://github.com/DIG-Network/dig_ecosystem/issues/1701.
Closes#320
🔴 Nothing is deleted and no keystore blob is touched
Every deleted line in this diff is a version string or a
SPEC.mdline extended in place:No code is removed, no dependency dropped, no served method withdrawn. The population count came back
ZERO on all four machines, so removal is unblocked — but removal is step 4 and is deliberately not here
(see below).
What is frozen
#[deprecated], each carrying the same note pointing at the #1500 ratification:wallet_authz::AUTH_PREFIXcrates/dig-node-service/src/wallet_authz.rsUnlockAuth::unlock,UnlockAuth::sign_unlockcrates/dig-wallet/src/sage/auth.rsWalletCustody::create/import/restorecrates/dig-wallet/src/sage/custody.rsWalletCustody::reveal_mnemonic/sign_oncecrates/dig-wallet/src/sage/custody.rsModule docs on
auth.rs,custody.rsandwallet_authz.rs, plusSPEC.md§7.12 / §18.20 / §18.24,name the ratification (
2026-07-22T03:27:48Z) and state thatdig-account'sPolicyAuthorizeris theonly enforcing custody gate from here.
OpenRPC discovery — the ticket's premise, corrected
The surface was already absent from discovery:
meta::methods()carries 63 methods and none isunder
auth.orwallet., and the Sage plane that dispatchesauth.*(POST /:method) has no runtimediscovery at all. So this PR removes no entry. It adds the guard that keeps the absence true, which is
the part a future change could silently undo — and the guard, not a deletion, is the reviewable artifact.
the_frozen_custody_surface_is_absent_from_every_discovery_artifactreads method names out of fourlayers: the
methods()catalogue,public_method_names()(the rpc.dig.net-facing view), the renderedOpenRPC document, and the rendered well-known document. It asserts each layer discloses at least one
name first, so a layer the guard cannot see fails loudly instead of passing vacuously.
Mutation proof — two placements, because one would not have been enough
A guard that only inspected
methods()would stay green if someone spliced a method object straightinto the OpenRPC body. Both were mutated separately:
MethodInfo { name: "auth.status", .. }besiderpc.discover:{"name":"auth.status"}ontomethod_objs:The message names the layer, so the failure says which door was opened. Both mutations were reverted
from a committed baseline via a file copy, never
git checkout.the_freeze_guard_leaves_the_control_plane_wallet_chain_reads_discoverablepins the other side: thefrozen prefixes are bare (
wallet.), while the light-client chain reads arecontrol.wallet.*. Itshaystack is the production
control::CONTROL_METHODSlist, not a literal, and it asserts it found atleast two so it cannot pass vacuously.
Still functional
the_frozen_custody_surface_is_still_functional_end_to_endwalks the whole key-touching path —import->unlock->sign_once->reveal_mnemonic-> byte-for-byte seed match -> a wrong passwordstill fails closed. Named honestly: the freeze introduces no behaviour change to revert, so this is a
forward guard against step 4 breaking custody, not a revert-proof of a fix.
wallet_authz::tests::auth_methods_are_gated_and_no_token_is_denied(pre-existing) is load-bearing forthis PR specifically: the
#[allow(deprecated)]had to move ontoclassifyitself, since an attributeon a tail
ifexpression is not stable Rust, and that test is what proves the gate did not weaken.Two deliberate non-changes
seed_store.rsis NOT#[deprecated]. It is a shared at-rest primitive with a second, unaffectedcaller — the node's OWN operator identity (
autoseed.rs, theDIGOP1/DIGVK1blobs), which noratification retires. Deprecating it would mark live code as retired. It carries a doc note saying that
instead.
Step 4 is not folded in. The ticket's wording is "drop
dig-walletfromdig-node-service", andthat predates the light client.
control.rsholds 56dig_walletreferences serving thecontrol.wallet.*chain reads, andWalletCustodyis fused intosync_supervisoras the node's ownwatched-address source. Removal is a carve-out of the custody subset from a crate the node still needs,
and doing it inside a freeze PR would put the top-priority light client behind a diff nobody could
review as one thing.
Blast radius checked
gitnexus
impactwas not used — no per-worktree index was built for this lane. The fallback wasripgrep call-graph enumeration plus
cargo check --all-targets, which for a pure#[deprecated]changeis exact rather than approximate: the compiler enumerates every use site by definition. Ten sites
warned. Nine are test code; the single production site is
WalletCustody::restoredelegating to thefrozen
import. Each took the narrowest#[allow(deprecated)]available, with a comment naming #1701.The lint was not widened anywhere and no attribute was dropped.
Risk: LOW. Additive attributes and docs, no control-flow change, no removal.
No
crates/dig-node-core/file is touched — that crate belongs to the sibling capsule-warm lane.Verification
cargo test --workspace --no-fail-faston the MERGED tree — 2312 passed, 0 failed, 5 ignored,41 suites, exit 0, zero
FAILEDlines and zeroerror:lines in the logcargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all --check— cleanok:meta::tests::the_frozen_custody_surface_is_absent_from_every_discovery_artifact ... okmeta::tests::the_freeze_guard_leaves_the_control_plane_wallet_chain_reads_discoverable ... oksage::custody::tests::the_frozen_custody_surface_is_still_functional_end_to_end ... okVersion
0.141.0->0.142.0->0.143.0(root workspace),dig-wallet0.29.1->0.30.0. Minor,not major:
#[deprecated]is an additive signal and nothing is removed or renamed, so no consumerbreaks.
The version collision happened and was handled.
origin/mainread0.141.0at bump time, so thisbranch took
0.142.0. While CI ran, #319 merged andchore(release): v0.142.0landed, taking thatnumber.
mainwas merged in and the bump re-taken to0.143.0. The union was then actuallycompiled —
cargo clippy --workspace --all-targets -- -D warningsclean and the full suite re-run —rather than assumed green from two separately-green branches.
Deferred, and said out loud
§2.4b (touch a crate -> bring its
dig-*/chia-*deps to latest) is not done here. These arepath-internal crates in an apps repo, and a chia uplift inside a freeze PR would dwarf the change and
put the light client at risk — §2.4b's own split clause. Flagged rather than silently skipped.