CoinJoin utilizes a salt to randomize the number of rounds used in a mixing session (introduced in dash#3661). This was done to frustrate attempts at deobfuscating CoinJoin mixing transactions but also has the effect of deciding the mixing threshold at which a denomination is considered "sufficiently mixed", which in turn is tied this salt, that is in turn, tied to the wallet.
With wallets that utilized keypool generation, this was perfectly acceptable as each key was unrelated to the other and any meaningful attempts to backup/restore a wallet would entail backing up the entire wallet database, which includes the salt. Meaning, on restore, the wallet would show CoinJoin balances as reported earlier.
With the default activation of HD wallets in legacy wallets (and the introduction of descriptor wallets that construct HD wallets by default), addresses are deterministically generated and backups no longer require a backup of the wallet database wholesale.
Users who export their mnemonic and import them into a new wallet will find themselves with a different reported CoinJoin balance (see below).
Motivation
CoinJoin utilizes a salt to randomize the number of rounds used in a mixing session (introduced in dash#3661). This was done to frustrate attempts at deobfuscating CoinJoin mixing transactions but also has the effect of deciding the mixing threshold at which a denomination is considered "sufficiently mixed", which in turn is tied this salt, that is in turn, tied to the wallet.
With wallets that utilized keypool generation, this was perfectly acceptable as each key was unrelated to the other and any meaningful attempts to backup/restore a wallet would entail backing up the entire wallet database, which includes the salt. Meaning, on restore, the wallet would show CoinJoin balances as reported earlier.
With the default activation of HD wallets in legacy wallets (and the introduction of descriptor wallets that construct HD wallets by default), addresses are deterministically generated and backups no longer require a backup of the wallet database wholesale.
Users who export their mnemonic and import them into a new wallet will find themselves with a different reported CoinJoin balance (see below).
https://github.com/dashpay/dash/assets/63189531/dccf1b17-55af-423d-8c36-adea6163e060
Demo
Based on
c00a3665
https://github.com/dashpay/dash/assets/63189531/c60c10e3-e414-46af-a64e-60605a4e6d07
Additional Information
coinjoinsalt
provides options togenerate
a new random salt,get
an existing CoinJoin salt orset
a new CoinJoin salt.coinjoin
has been converted into a composite command, which should allow dedicatedhelp
text for each subcommand.coinjoin stop
will now report an error if called when there is no session to stop.getcoinjoininfo
will not longer incorrectly display the keypool replenishment stat for descriptor wallets.Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.