JoinMarket-Org / joinmarket-clientserver

Bitcoin CoinJoin implementation with incentive structure to convince people to take part
GNU General Public License v3.0
731 stars 179 forks source link

The tumbler acted is a weird way and got a message saying that I have insufficient funds #655

Closed scottcarter2020 closed 4 years ago

scottcarter2020 commented 4 years ago

Hello,

I created a new tumble schedule and only increased the (average wait time between transactions).

I also increased the confirm_timeout_hours to be 24 hours.

Everything was running perfect until I woke up from my nap to check the progress of the tumble to see a warning window like the one in beneath, but instead of that red sign, it was a yellow one, and what I can remember that in the end of the sentence of that warning it stated there are insufficient funds

Image of error

Here is the log of the tumble

Completed successfully this entry: From mixdepth 2, sends amount: ###### satoshis, without rounding, to destination address: ######################################, after coinjoin with 6 counterparties. Txid was: ################################################################ Waiting for: ##.## minutes. Transaction attempt failed, tweaking schedule and trying again. The paramaters of the failed attempt: [3, #.################, 9, 'INTERNAL', ###, 3, 0] We tweaked the schedule, the new schedule is: [[0, 0, 8, 'INTERNAL', #####, 16, 1], [1, #.########################, 8, 'INTERNAL', ####, 16, 1], [1, 0, 6, 'INTERNAL', ####, 16, 1], [2, #.###############, 7, 'INTERNAL', ####, 16, 1], [2, 0, 6, '############################', ####, 16, 1], [3, #.#################, 9, 'INTERNAL', ####, 3, 0], [3, 0, 9, '#################################', #####, 16, 0], [4, 0, 8, '###################################', ######, 16, 0]]

Unfortunately, I didn't take a screenshot of the warning window.

Something to note before continuing, the creepiness started when a tx didn't get the 5 confirmations as it's required to be a valid sourced commitment, and the tumbler accepted it and jumped into the next tx.

I clicked OK on that warning window and closed the tumbler and when I tried to restart the tumbling schedule it wanted to restart from the beginning not from where it stopped.

I saw that the tumbler sent part of the tumbled coins to one of my destination addresses.

In the bitcoin core, its still showing the total number of bitcoins (before) sending to that destination address. The total number of coins inside the joinmarket wallet is (different) to that in the bitcoin core one. I think this is OK as still the coins is not yet spent from the destination address.

While editing out the log, I noticed that the tumbler sends out the tumbled coins from different mixdepths, though I thought it would have (all) of them in the most private mixdepth which is mixdepth 4 and from there it sends the coins to the destination addresses.

To have this organized for me and the future readers, I will list the questions in beneath

scottcarter2020 commented 4 years ago

@AdamISZ I hope you didn't forget this issue please.

AdamISZ commented 4 years ago

Why didn't the tumbler wait for the 5 confirmations for one of my txes and marked it as valid and jumped into the next tx ?

That's a bit of a misunderstanding, it is not necessarily required; the taker sources commitments from any utxo in the wallet. The design of the tumbler is deliberately "dumb" for robustness: if it can't source any commitments of sufficient size and age, it just waits and tries again later.

Side note, I logged into the IRC channel yesterday and found no one is online, I wish that my questions is not a general one and are actionable to my case here.

That channel is logged (see the topic of the channel for the location of the logs), you can see that you were answered. However I do understand that most people don't have bouncers and so can't wait for answers. I don't have any particular solution for that. For my part I don't have infinite time to answer every and all support requests.

About the initial report, you presumably saw a "Not enough funds" error for the transaction, which can happen if either the amount is small or network fees are unusually high such that the prepared transaction ends up having too large of a fee for it to work. It's hard to say without more information. Restarting the run by selecting TUMBLE.schedule in the Multi join tab is a viable option in the rare cases where the run just stops (usually it is just going to retry after a timeout).

Isn't the tumbler supposed to get all the coins in the mixdepth 4 and then send them to the destination addresses ?

No, not one destination address. There are supposed to be multiple. You are correct that if they are blank it will be sent to the next mixdepth modulo 5 but that's not how it's supposed to be used, see docs/tumblerguide.md for instructions (and some corresponding commentary in the joinmarketqtguide).

AdamISZ commented 4 years ago

Closing this due to inactivity. If there is something that needs actioning please feel free to reopen.