`AwaitingFunding..(..)` doesn't consistently decrement
See swap 0x28ef6b85b36d47d44820d999322e671bdf51c75b31f03c6f2be0d9db1303ffb9:
[2021-12-16T04:14:52Z INFO farcaster_node::walletd::runtime] 0x28ef…ffb9 | Success(Swapped) in swap 0x28ef…ffb9, cleaning up data
[2021-12-16T04:14:52Z INFO farcaster_node::swapd::runtime] 0x28ef…ffb9 | Terminating swap<0x28ef…ffb9>
[2021-12-16T04:14:52Z INFO farcaster_node::peerd::runtime] Terminating peerd<026b9739e4610c2a7e8d585b5a9b81e243a7baabfacae421e47e7b038665ffebb1@0.0.0.0:9783>
[2021-12-16T04:14:53Z WARN farcaster_node::syncerd::monero_syncer] error opening to be sweeped wallet: Server error: Failed to open wallet, falling back to generating a new wallet
[2021-12-16T04:14:55Z INFO farcaster_node::syncerd::syncer_state] Bitcoin incremented height 2131423
[2021-12-16T04:15:03Z INFO farcaster_node::syncerd::monero_syncer] Sweeping address 55fnVfbGjfZRhW58G4VMF8fjvTuwvEBxmSRHLr499n8J6hYafp1RiEDjaqGuqh36KG7dJrgWoGdZGaU7SVA8pdeBAPVy4n4 with unlocked balance 0.342702290000 XMR into 59L74iEysTwMbRxRpKMRrrgUf7JnYRrRYf5VWos88aNR3HsQCKYTn9ZevUWxkdA4dZ6KQtQvdsb22SM8iKXPvXzVM8uUrAQ
[2021-12-16T04:15:04Z INFO farcaster_node::syncerd::monero_syncer] Sweep transaction hash: fc3234302b73a9558dad2888adb2c3d9df3ae6305368575e3b51acd84034b17d
[2021-12-16T04:15:04Z INFO farcaster_node::swapd::runtime] 0x9695…13dc | State transition: BobState(BuySig) -> BobState(Finish(Success(Swapped)))
[2021-12-16T04:15:04Z INFO farcaster_node::farcasterd::runtime] Terminating Bitcoin (Testnet) syncer
[2021-12-16T04:15:04Z INFO farcaster_node::farcasterd::runtime] Terminating Monero (Testnet) syncer
[2021-12-16T04:15:04Z INFO farcaster_node::farcasterd::runtime] Swapped(71) | Refunded(0) / Punished(0) | Initialized(71) / AwaitingFundingXMR(1) / AwaitingFundingBTC(0) / FundedXMR(33) / FundedBTC(37) / FundingCanceledXMR(0)
@Lederstrumpf is this still a problem?
This should have been fixed when we switched to hash sets. I let @Lederstrumpf close if he thinks that's correct.
it's still an issue, stats of the last two runs:
[2022-12-01T15:55:34Z INFO farcaster_node::farcasterd::stats] Swapped(1822) | Refunded(17) / Punished(0) | Aborted(0) | Initialized(1850) / AwaitingFundingXMR(142) / AwaitingFundingBTC(0) / FundedXMR(767) / FundedBTC(919) / FundingCanceledXMR(16) / FundingCanceledBTC(0)
with this one, Swapped + Refunded + Punished Aborted < Initialized too, so we may still have issues with the incrementation of these too.
[2022-12-06T17:54:24Z INFO farcaster_node::farcasterd::stats] Swapped(50) | Refunded(0) / Punished(0) | Aborted(0) | Initialized(50) / AwaitingFundingXMR(5) / AwaitingFundingBTC(0) / FundedXMR(21) / FundedBTC(24) / FundingCanceledXMR(0) / FundingCanceledBTC(0)
What's the case for both (and the original logs I posted a year back) is that it's only on the monero side, so likely the issue's unchanged.
I re-checked the data flows that trigger the stats increases and did not find anything. @Lederstrumpf when you do your next run, can you re-post the stats? Things have changed quite a bit now since the last run you posted after all.
This last run's done - initialized stats are looking consistent:
[2023-01-05T05:30:10Z INFO farcaster_node::farcasterd::stats]
Swapped(1234) | Refunded(23) / Punished(18) | Aborted(22) | Initialized(1336)
/ AwaitingFundingXMR(0) / AwaitingFundingBTC(0)
/ FundedXMR(644) / FundedBTC(631)
/ FundingCanceledXMR(1) / FundingCanceledBTC(1)
with 39 swaps still running.
Running = Initialized - {FundedXMR, FundedBTC, Aborted}, which strikes me as correct, assuming that all funded swaps completed.
I'll give it one more run where I also don't abort any swaps, but rather just kill any open deals, to ratify.
Are we done here?