Closed cipig closed 2 years ago
btw, what happens to orders that were created with a much older version of mm2? what if something changes in the rules that apply when you post an order? are those rules rechecked every time or is the order simply taken 1:1 as is? all in all i think it would be best to not save nor restore any orders between mm2 restarts... the clients using mm2 should handle this, if even needed (eg trading bots don't need it)
i guess a possible hotfix would be to make mm2 issue a cancel request for all ismine:true orders that don't have a file in DB/ORDERS/MY... but i fear only a hardfork (changing netid/ports) will make those orders go away
when querying orderbook from the node the created the order it even shows "is_mine": true,
is_mine
is detected by the order creator's pubkey, it might not exist on a specific node in this case. Do you see it in the my_orders
response? Could you please also recheck that there's no other node running with the same passphrase, which has this order in its DB?
there is no other node running with that passphrase
the order 5530f43b-c5f4-40ee-9df3-22d5516b35a6
is gone in the meantime, will need to recreate the situation manually again to see what my_orders
shows
one thing is sure: the file was gone from DB/MY/ORDERS while order was still visible in orderbook
i guess the problem is a timing thing... but i also neet to check when and how the order disappeared, i actually expected it to stay in orderbook forever as long as the node with that passphrase is online
i reprocuced the situation:
created BTX/KMD order (sell 123 BTX, while balance was 123.xx) orderbook on other node shows the ask (maxvolume 122.xx):
{
"coin": "BTX",
"address": "2GsvnppMrTqW3G4pN7BTynC2YeEfSid3YF",
"price": "1",
"maxvolume": "122.8479339608868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"min_volume": "0.000105",
"pubkey": "039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499",
"age": 1640095236,
"zcredits": 0,
"uuid": "6fb30f23-79d7-414b-83be-156d21dfe3cd",
"is_mine": false,
"base_max_volume": "122.8479339608868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"base_min_volume": "0.000105",
"rel_max_volume": "122.8479339608868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"rel_min_volume": "0.000105",
"base_max_volume_aggr": "346.7045215768868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"rel_max_volume_aggr": "183.6968380248274501737542416452442159383033419023136246786632390745501285347043701799485861182519280"
},
withdrew 100 BTX orderbook shows the new value (maxvolume 23.xx)
{
"coin": "BTX",
"address": "2GsvnppMrTqW3G4pN7BTynC2YeEfSid3YF",
"price": "1",
"maxvolume": "23.00674979",
"min_volume": "0.000105",
"pubkey": "039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499",
"age": 1640095642,
"zcredits": 0,
"uuid": "6fb30f23-79d7-414b-83be-156d21dfe3cd",
"is_mine": false,
"base_max_volume": "23.00674979",
"base_min_volume": "0.000105",
"rel_max_volume": "23.00674979",
"rel_min_volume": "0.000105",
"base_max_volume_aggr": "246.863337406",
"rel_max_volume_aggr": "83.7929230148774217888"
},
but my_orders on that node shows old value:
"6fb30f23-79d7-414b-83be-156d21dfe3cd" : {
"conf_settings" : {
"base_nota" : false,
"rel_nota" : false,
"base_confs" : 3,
"rel_confs" : 1
},
"created_at" : 1640095203968,
"uuid" : "6fb30f23-79d7-414b-83be-156d21dfe3cd",
"cancellable" : true,
"max_base_vol" : "122.8479339608868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"price" : "1",
"updated_at" : 1640095203968,
"rel" : "KMD",
"matches" : {},
"started_swaps" : [],
"available_amount" : "122.8479339608868894601542416452442159383033419023136246786632390745501285347043701799485861182519280",
"min_base_vol" : "0.000105",
"base_orderbook_ticker" : null,
"base" : "BTX"
}
}
}
the difference can be seen in GUI too (orderbook 23, my_orders 123)
stopped GUI and restarted, mm2.log shows this error
21 14:18:25, lp_ordermatch:2814] INFO Error maker_swap:1544] utxo_common:2190] utxo_common:478] Not enough BTX for swap: available 23.00792889, required at least 122.84895588, locked by swaps None on balance check to kickstart order 6fb30f23-79d7-414b-83be-156d21dfe3cd, cancelling
and orderbook still shows the old order (the one with 23), but it is gone from my_orders
"coin": "BTX",
"address": "2GsvnppMrTqW3G4pN7BTynC2YeEfSid3YF",
"price": "1",
"maxvolume": "23.00674979",
"min_volume": "0.000105",
"pubkey": "039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499",
"age": 1640096375,
"zcredits": 0,
"uuid": "6fb30f23-79d7-414b-83be-156d21dfe3cd",
"is_mine": false,
"base_max_volume": "23.00674979",
"base_min_volume": "0.000105",
"rel_max_volume": "23.00674979",
"rel_min_volume": "0.000105",
"base_max_volume_aggr": "326.863337406",
"rel_max_volume_aggr": "107.1209414598444745376"
},
situation can be seen in GUI too
the order is in orderbook and is_mine
, but it is gone from my_orders
and i can't cancel it, it is a zombie order
the order with uuid 6fb30f23-79d7-414b-83be-156d21dfe3cd
is still in orderbook... i restarted ADEX Desktop some hours ago, but it didn't help... the error on order kickstart was not shown, since file of order was already removed on last restart
@cipig Could you please check that it is fixed in the https://github.com/KomodoPlatform/atomicDEX-API/tree/zombie_orders_fix branch?
built ADEX Desktop with mm2 from this branch and recreated the above situation created a sell order with the entire amount, withdrew some BTX, result: orderbook updated with new balance, my_orders showing old value after restart of ADEX Desktop the order is updated in my_orders too showing new value, order uuid same, order in orderbook still fine order showing up in my_orders, so it can be cancelled, disappearing from orderbook too no more zombie orders, problem fixed, thanks a lot
@cipig Great, thanks! Could you please retest the https://github.com/KomodoPlatform/atomicDEX-API/pull/1179? I made one more important change to properly set the new max_base_vol
.
nice, my_orders is now also updated right after withdraw (initial sell was for 6 BTX, then i withdrew some) all good after restart too, order is recreated and visible in my_orders and orderbook with updated volume
I ran into the same issue that was reported by some users on Discord. I have once placed an order in EFL/LTC orderbook with ADEX Desktop and i can't cancel it anymore. It's the one with the green dot:
The order is visible in the orderbook on other nodes:
when querying orderbook from the node the created the order it even shows
"is_mine": true,
but there is no file on the node that created the order in mm2/DB/2a62e1cabacba3760ac65ee712834423a8eadd83/ORDERS/MY/MAKER/looking in the logs i could find this entry:
2021-11-19-15-25-57.mm2.log:19 15:26:00, lp_ordermatch:2807] INFO Error maker_swap:1635] utxo_common:2279] utxo_common:534] Not enough LTC for swap: available 0.01351947, required at least 0.08089976, locked by swaps None on balance check to kickstart order 5530f43b-c5f4-40ee-9df3-22d5516b35a6, cancelling
so my LTC balance is lower then needed (or at least mm2 thinks that) and mm2 tried to cancel it during last restart, but the order is still there (in orderbook). but why
required at least 0.08089976
for an order that actually only needs 0.0135169? EDIT: therequired at least 0.08089976
is from the ask that i initially tried to match with my buy... it didn't match and that order was converted to maker order, but with rel_volume 0.0135169, not 0.08089976