-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New deposit ignored by yield-generator #1021
Comments
There is a confirm as well as an unconfirm callback. So, the way it currently works is, the confirm callback is inside the client_protocol module, which is the one responsible for telling the daemon (the 'network/messaging daemon' perhaps best to call it, the thing responsible for talking to other bots over message channels, but knows nothing about bitcoin keys etc.) what messages to send out. Currently the |
Or actually I think it's even simpler. See here:
So basically we already register that function I mean there will be some details but probably that's basically it. |
OK, still reading the code and I spoke a bit too soon there. You need a new confirmed callback function. It'll take a bit more thinking (although I think it will end being a fairly small code delta, still). |
Derp, obviously you'll need a new confirm_callback quite separate from the above; because currently the callback is only added once a coinjoin has been negotiated (so it wouldn't even work if the deposit came in when there was no coinjoin in flight). But the line joinmarket-clientserver/jmclient/jmclient/client_protocol.py Lines 504 to 505 in ff10262
|
I would love to see this fix merged even if an updated offer isn't announced after the confirmation. It would be a pure improvement upon the current status quo. |
This isn't correct. It will be used, but the new balance will only be added to the published offer after another coinjoin transaction completes. Technically the new funds could actually be used in a coinjoin. (That's why I was mildly confused this was labelled 'bug'; it's something at least I've known for years and explained this point to people many times on IRC, I thought there was at least one issue opened about it before, but perhaps not, as I can't find one. So I didn't see it as quite so pressing, since it self corrects after a while. See
which gets the current real time balance. It's just only called, currently, when a coinjoin transaction confirms (and also on unconfirm, i.e. it gets triggered twice for each coinjoin).) |
Fixes #1021. Also applies to withdrawals. This commit adds a registration of a callback for all transactions, which then follows up with a callback on the confirmation event, after which we send the AnnounceOffers message to the daemon (after modifying our orders in line with current balance). Minor changes: WalletService.active_txids is a set, not a list, to avoid reannouncements, and the unused argument to on_tx_confirmed is removed.
It's not particularly trivial in terms of how much code, albeit it is trivial conceptually. |
Interesting... So in my own experience, after a new deposit was confirmed, even though there were several CoinJoin transactions happened afterwards, none of them utilized the new deposit. And after I restarted the maker, the very next Coinjoin transaction immediately utilized that new deposit. It had been the same case multiple times, and I'd learned to always restart the maker if I wanted the new deposit to be used. It is possible that had I waited long enough, the new deposits might eventually got utilized. Even though that doesn't seem to be the case from my own experience, but I have only limited data. |
I mean the best way to test is on regtest. I can only say it makes no sense to me, since the call to get_balance_by_mixdepth is at the time of creating a new announcement (create_my_orders), and then in subsequent coinjoins the filling of the offer with actual utxos does |
It's possible that this is a bug that was fixed by #1278 ? Of course the general topic in this thread is only addressed by #1042 or similar, but wondering about that specific report. |
Yes, confirmed that with #1278 , this issue is now fixed. |
While yield-generator is running, if the maker deposited new fund into the wallet, it will be ignored by yield-generator and will not be selected to participate the coinjoin process (even though it does recognize that a new UTXO has been added to the wallet). The
yield-generator
has to be restarted in order for it to make use of those new deposits.Ideally, the yield-generator could recognize the new deposit and use it in the coinjoin process without the need of relaunching it.
The text was updated successfully, but these errors were encountered: