joinmarket-clientserver
joinmarket-clientserver copied to clipboard
Tumbler error afret --restart: No confirmed coins in the selected mixdepth(s). Quitting
Hi,
After running the tumbler for a few hours, it showed a message through CLI that I have one utxo which has less then 5 confirmations and that Taker is stopping:
[INFO] Taker not continuing after receipt of orderbook
I've restarted the tumbler with the initial command with --restart after the utxo got 7 confirmations, but got another error message:
Traceback (most recent call last):
File "tumbler.py", line 193, in <module>
main()
File "tumbler.py", line 143, in main
raise ValueError("No confirmed coins in the selected mixdepth(s). Quitting")
ValueError: No confirmed coins in the selected mixdepth(s). Quitting
I've analyzed tumbler.py code and I believe the problem is the loop in line 140:
for i in range(options['mixdepthsrc'], max_mix_to_tumble):
total_tumble_amount += wallet_service.get_balance_by_mixdepth()[i]
if total_tumble_amount == 0:
raise ValueError("No confirmed coins in the selected mixdepth(s). Quitting")
options['mixdepthsrc'] and max_mix_to_tumble are 0 and 4 (loaded from the wallet), so the loop is going through the mix depths to calculate total_tumble_amount by adding amounts from each mix depth.
The problem is if you restarted the tumbler with --restart, there is a chance that one of the mix depths is empty and this will trigger the error. In my case mix depth 0 was empty, so the loop only executed once since if total_tumble_amount == 0
was true.
Imo, there are 2 ways to fix this:
- Check if we are in --restart mode to start the loop from the first mix depth in the schedule:
if res:
min_mix_depth = schedule[0][0]
else:
min_mix_depth = options['mixdepthsrc']
for i in range(min_mix_depth, max_mix_to_tumble):
- Take the If statement out of the Loop:
for i in range(options['mixdepthsrc'], max_mix_to_tumble):
total_tumble_amount += wallet_service.get_balance_by_mixdepth()[i]
if total_tumble_amount == 0:
raise ValueError("No confirmed coins in the selected mixdepth(s). Quitting")
I've tested the second way and the tumbler finished successfully.
Let me know if there is any other information I can provide in order to fix this.
I have the same issue.
Steps to reproduce: 1.) empty mixdepth 0 2.) create a TUMBLE.schedule starting from depth 1 3.) run tumbler.py --restart
It will fail.
I remember this issue being reported a couple of times last year, but I don't remember the status. Did anyone look further into it?
Steps to reproduce: 1.) empty mixdepth 0 2.) create a TUMBLE.schedule starting from depth 1 3.) run tumbler.py --restart
It will fail.
If you add the flag -m 1
to run tumbler.py -m 1 --restart
, there will be no error.
generally speaking
as a workaround, one can use the flag -m [startingmixdepth accodring to TUMBLER.schedule]. This is not very user friendly, but works for now.
expected behavior tumbler.py recognizes the first line of the schedule file as starting mixdepth and doesn't need the -m flag to run the schedule file properly.
This should be fixed, or more correctly, now irrelevant, after the change in version 0.9.7 to a 'cyclic' fixed mixdepth wallet tumbler algo.