WalletWasabi icon indicating copy to clipboard operation
WalletWasabi copied to clipboard

CoinJoinClient failed with exception: 'System.ArgumentException: Overall balance must not be negative.

Open yahiheb opened this issue 2 years ago • 9 comments

I got this while coinjoining (payincoinjoin) on testnet.

2024-03-01 03:44:16.206 [39] INFO       CoinJoinClient.ProceedWithRoundAsync (348)      Blame Round (a8c842f997e74867155a7888f4bbbbf8858985f3220fe8214eee4d5242cb6d96): Successfully registered 5 inputs.
2024-03-01 03:44:23.216 [39] INFO       PaymentBatch.LogPaymentSetDetails (131) Best payment set contains 0 payments.
2024-03-01 03:44:24.017 [39] ERROR      CoinJoinManager.HandleCoinJoinFinalizationAsync (555)   Wallet (Daemon): CoinJoinClient failed with exception: 'System.ArgumentException: Overall balance must not be negative.
   at WalletWasabi.WabiSabi.Client.CredentialDependencies.DependencyGraph.FromValues(IEnumerable`1 inputValues, IEnumerable`1 outputValues) in WalletWasabi\WabiSabi\Client\CredentialDependencies\DependencyGraph.cs:line 96
   at WalletWasabi.WabiSabi.Client.CredentialDependencies.DependencyGraph.ResolveCredentialDependencies(IEnumerable`1 inputValues, IEnumerable`1 outputValues) in WalletWasabi\WabiSabi\Client\CredentialDependencies\DependencyGraph.cs:line 74
   at WalletWasabi.WabiSabi.Client.CredentialDependencies.DependencyGraph.ResolveCredentialDependencies(IEnumerable`1 effectiveValuesAndSizes, IEnumerable`1 outputs, FeeRate feeRate, Int64 vsizeAllocationPerInput) in WalletWasabi\WabiSabi\Client\CredentialDependencies\DependencyGraph.cs:line 67
   at WalletWasabi.WabiSabi.Client.CoinJoinClient.ProceedWithOutputRegistrationPhaseAsync(uint256 roundId, ImmutableArray`1 registeredAliceClients, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinClient.cs:line 765
   at WalletWasabi.WabiSabi.Client.CoinJoinClient.ProceedWithRoundAsync(RoundState roundState, IEnumerable`1 smartCoins, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinClient.cs:line 354
   at WalletWasabi.WabiSabi.Client.CoinJoinClient.StartRoundAsync(IEnumerable`1 smartCoins, RoundState roundState, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinClient.cs:line 252
   at WalletWasabi.WabiSabi.Client.CoinJoinClient.StartRoundAsync(IEnumerable`1 smartCoins, RoundState roundState, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinClient.cs:line 332
   at WalletWasabi.WabiSabi.Client.CoinJoinClient.StartCoinJoinAsync(Func`1 coinCandidatesFunc, Boolean stopWhenAllMixed, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinClient.cs:line 201
   at WalletWasabi.WabiSabi.Client.CoinJoinManager.HandleCoinJoinFinalizationAsync(CoinJoinTracker finishedCoinJoin, ConcurrentDictionary`2 trackedCoinJoins, ConcurrentDictionary`2 trackedAutoStarts, CancellationToken cancellationToken) in WalletWasabi\WabiSabi\Client\CoinJoinManager.cs:line 500'
2024-03-01 03:44:24.022 [39] INFO       CoinJoinManager.HandleCoinJoinFinalizationAsync (604)   Wallet (Daemon): CoinJoinClient restart automatically.
2024-03-01 03:45:08.449 [37] INFO       AliceClient.RegisterInputAsync (118)    Round (f9ec0b4c6fc7bf3bf16c0c0195dd49b8ca46eb7d366553cef3671fed6c457aff), Alice (3193bc7c-9948-703a-aa2d-5be5301f74f7): Registered 1a40173832f58f9f83c2521015831ecadff2a80d8d81d385ce8943f5b0dc6ee9-15.

yahiheb avatar Mar 01 '24 02:03 yahiheb

What version are you using?

lontivero avatar Mar 01 '24 13:03 lontivero

I was using master, b87a60b

yahiheb avatar Mar 01 '24 15:03 yahiheb

I'm getting the same error as well. Does the send amount for payincoinjoin have to be one of the standard denominations?

jcjones94 avatar Mar 03 '24 04:03 jcjones94

Does the send amount for payincoinjoin have to be one of the standard denominations?

No, but it must be higher than the minimum output allowed (5000 sats usually) and of an accepted script type. We are investigating the issue and will provide more information soon!

turbolay avatar Mar 03 '24 04:03 turbolay

I cannot reproduce it.

lontivero avatar Mar 05 '24 13:03 lontivero

can repro. so Best payment set contained 1 payment, then CJ failed and went into blame round. inputs were succesfully registered to the blame round and then there is log: Best payment set contains 0 payments and then the error. then coinjoinclient restarts automatically. but after that the coins never participate in CJ again, the log says about those utxo's "was already registered", while those are other rounds with other roundID. so something there is also wrong in the client.

MarnixCroes avatar Mar 28 '24 11:03 MarnixCroes

https://github.com/zkSNACKs/WalletWasabi/issues/12584#issuecomment-1978767182

molnard avatar Apr 16 '24 08:04 molnard

Was this PR closed by mistake? @MarnixCroes could repro and provided an explanation to it.

turbolay avatar Apr 16 '24 13:04 turbolay

https://github.com/zkSNACKs/WalletWasabi/issues/12584#issuecomment-2024955031

yahiheb avatar Apr 16 '24 13:04 yahiheb