1What removevault does (and does not)
removevault is the manager's "forget this vault". The wallet stops tracking the vault script, stops counting its coins as stakable, and stops staking them. That is all.
- It sends no transaction and moves no coins. The owner's coins stay in the vault on the chain.
- It does not notify the owner. The owner's wallet still shows the vault; it just earns nothing until a manager adds it again.
- It cannot be used by a manager to take anything.
2When to use it
- The owner reclaimed everything and you want a clean
getcoinavailability. - You are retiring a staking machine and want it to stop trying to stake vaults it no longer should (see move a vault to a new manager).
- You added the wrong txid or encoding on IronDivi and need to remove the phantom entry.
3IronDivi: removevault needs two arguments
Unlike Divi Core, IronDivi wants the encoding and the funding txid, because it tracks vaults per funding transaction:
irondivi-cli --testnet removevault "yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4" 8690d187995b86c35731b3481b0b13aeaf094d61ddea09a1adc07944182d64e0
{
"message": "Vault yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4:yC9jjkQGrQnZFExYR8UYgjCpJeD7gJRVF4 removed successfully",
"result": "success",
"tx_hash": "8690d187995b86c35731b3481b0b13aeaf094d61ddea09a1adc07944182d64e0"
}
On the manager wallet, getcoinavailability went from Spendable 50 / Vaulted 219 to Spendable 269 / Vaulted 0 with total_vaults 0, and listunspent listed the two vault outputs as "spendable": true. Nothing on the chain changed; the manager key still cannot spend them. sendtoaddress then picked one of those outputs and failed with Only signed 0 of 1 inputs, even for amounts the plain 50 coins could cover. The workaround that worked: createrawtransaction naming your own plain output, signrawtransaction, sendrawtransaction (txid 570333b2…4b6b, 49.9999 sent). Restarting irondivid may clear the stale entries; we did not test that. Transcript: transcripts/irondivi-removevault-aftermath.txt.
Errors you can hit:
# encoding only
error code: -1: Missing required parameter: tx_hash
# a vault this wallet never added
error code: -4: Vault yC9j…RVF4:yC9j…RVF4 not found in wallet
# no colon
error code: -8: Could not parse vault encoding!
4divi-cli: removevault
Divi Core takes only the encoding and removes the whole script, every funding output included:
divi-cli -testnet removevault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" { "removal_status" : true } divi-cli -testnet getcoinavailability { "Vaulted" : 0.00000000, "Stakable" : 109.99995040, ← was 159.99995040 with the 50-coin vault "Spendable" : 9.99995040 }
removal_status is false when the wallet never had that vault (per rpcwallet.cpp; we did not make it happen). An encoding without a colon gets Could not parse vault encoding! and a bad address Vault Registry Failed: Invalid manager/owner DIVI address, the same checks as addvault.
5Divi Desktop debug console
removevault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc"
Same reply as divi-cli. Divi Desktop needs vault=1 in divi.conf to have added the vault in the first place.
6BoxWallet
~/.boxwallet/divi-cli -testnet removevault "owner:manager"
7Undo: add it back
Because nothing happened on the chain, undo is just addvault with the original funding txid. On Divi Core the balance returns immediately:
divi-cli -testnet addvault "y3kSaibA98YDgLyoxnbXca69uLzBxjAYga:yF5g4mEraodvfjdRE5VrWum9pSF9gMdssc" 3d564b50e7057ad7eb2b73aea5a276ca4d9c76899a66d99b7366e89dd297b45a { "succeeded" : true } divi-cli -testnet getcoinavailability { "Vaulted" : 0.00000000, "Stakable" : 159.99995040, "Spendable" : 9.99995040 }
Trouble
| You see | Means | Do |
|---|---|---|
| removal_status false (Divi Core) | Vault not registered here | Check getcoinavailability true |
| Missing required parameter: tx_hash (IronDivi) | IronDivi needs the funding txid too | Add it; find it with getcoinavailability true |
| Vault … not found in wallet (IronDivi) | Encoding or txid does not match what was added | Copy both from getcoinavailability true |
Still stuck? Ask the Divi chatbot.