-32044 now means two opposite things
dig-node-control-interface 0.20.0 allocates:
-32044 WALLET_COINS_RESERVED "This is a wait, NOT a shortfall."
dig-node has already shipped -32044 with a different meaning, and it is the DEFAULT refusal on
control.wallet.broadcast:
crates/dig-node-service/src/meta.rs ErrorCode::WalletNodeSpendDisabled => -32044
crates/dig-node-service/src/control.rs:2426 (emitted)
Its own doc says: "the bundle spends a coin at one of the NODE's OWN custodied puzzle hashes while
DIG_WALLET_ENABLE_LIVE_BROADCAST is off … Retrying cannot help."
So the same integer instructs a client to retry after a wait and that retrying cannot help.
Those demand opposite actions, and one of them is about money moving. This is exactly the
shortfall-vs-wait confusion WALLET_COINS_RESERVED was introduced to prevent, reappearing one layer
down.
Not a reasoned worry — dig-node's own gate fails on it
Implementing the three methods on loop/3127-serve-reservations makes dig-node's pre-existing
uniqueness test fail:
meta::tests::error_codes_are_unique_and_upper_snake
panicked: duplicate numeric code -32044
403 other tests pass. That one failure is the whole blocker.
Recommended fix — the contract moves, not dig-node
WALLET_COINS_RESERVED -> -32046, WALLET_RESERVATIONS_UNAVAILABLE -> -32047.
- Register
WALLET_NODE_SPEND_DISABLED at -32044 in the shared catalogue, which is the root
cause: dig-node minted a code inside the shared -3204x wallet range without it ever being
declared here, so nothing could detect the clash at allocation time.
Rationale: -32044-as-spend-disabled is shipped and reachable today on every default install,
while -32044-as-coins-reserved was published hours ago with zero implementors — dig-node's
branch is the first. Renumbering the unshipped side costs a version bump; renumbering the shipped
side breaks any client already decoding it.
dig-node takes both numbers from this crate's constants rather than restating them, so a
renumber here needs no dig-node code change beyond the dependency bump.
Worth adding either way
A test asserting every catalogued code is unique and that no implementor has minted an
unregistered code in a reserved range. The collision was invisible because the two catalogues were
never compared.
Filed from the dig-node serve lane for https://github.com/DIG-Network/dig_ecosystem/issues/3127.
-32044now means two opposite thingsdig-node-control-interface0.20.0 allocates:dig-node has already shipped
-32044with a different meaning, and it is the DEFAULT refusal oncontrol.wallet.broadcast:Its own doc says: "the bundle spends a coin at one of the NODE's OWN custodied puzzle hashes while
DIG_WALLET_ENABLE_LIVE_BROADCASTis off … Retrying cannot help."So the same integer instructs a client to retry after a wait and that retrying cannot help.
Those demand opposite actions, and one of them is about money moving. This is exactly the
shortfall-vs-wait confusion
WALLET_COINS_RESERVEDwas introduced to prevent, reappearing one layerdown.
Not a reasoned worry — dig-node's own gate fails on it
Implementing the three methods on
loop/3127-serve-reservationsmakes dig-node's pre-existinguniqueness test fail:
403 other tests pass. That one failure is the whole blocker.
Recommended fix — the contract moves, not dig-node
WALLET_COINS_RESERVED->-32046,WALLET_RESERVATIONS_UNAVAILABLE->-32047.WALLET_NODE_SPEND_DISABLEDat-32044in the shared catalogue, which is the rootcause: dig-node minted a code inside the shared
-3204xwallet range without it ever beingdeclared here, so nothing could detect the clash at allocation time.
Rationale:
-32044-as-spend-disabled is shipped and reachable today on every default install,while
-32044-as-coins-reserved was published hours ago with zero implementors — dig-node'sbranch is the first. Renumbering the unshipped side costs a version bump; renumbering the shipped
side breaks any client already decoding it.
dig-node takes both numbers from this crate's constants rather than restating them, so a
renumber here needs no dig-node code change beyond the dependency bump.
Worth adding either way
A test asserting every catalogued code is unique and that no implementor has minted an
unregistered code in a reserved range. The collision was invisible because the two catalogues were
never compared.
Filed from the dig-node serve lane for https://github.com/DIG-Network/dig_ecosystem/issues/3127.