chore(release): v2.1.0-beta
changelog to be added ...
What effects does the DB changes have? If seed nodes don't save JSON files of swaps any more, then i can't use this on my seeds, else i will destroy all stats. What about the "normal" maker nodes? will updating those will have an effect on swap JSON files on the seeds?
Other question: is there a way to tell mm2 to continue saving swap infos in files, like with a startup param? That would help a lot, since i have other workflows that require the presence of those files, eg failed swap recovering.
What effects does the DB changes have? If seed nodes don't save JSON files of swaps any more, then i can't use this on my seeds, else i will destroy all stats. What about the "normal" maker nodes? will updating those will have an effect on swap JSON files on the seeds?
JSON files are not used for v2 swaps only which to be activated currently "use_trading_proto_v2": true has to be added to MM2.conf
Other question: is there a way to tell mm2 to continue saving swap infos in files, like with a startup param? That would help a lot, since i have other workflows that require the presence of those files, eg failed swap recovering.
We can look into that for v2 swaps before activating it or you can use my_swap_status to get the data and save it in files yourself (adding another workflow).
so for v1 swaps, nothing changes? the files will still be there on makers and seeds?
i use the files on the seeds to add the swaps to MySQL which feeds different things
and on the makers i need them to refund... i need to call this manually from time to time
## maker
for i in `grep -l '"type":"MakerPaymentRefundFailed"' DB/*/SWAPS/MY/* | cut -d "/" -f 5 | cut -d "." -f 1`; do echo $i && curl -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"recover_funds_of_swap\",\"params\":{\"uuid\":\"$i\"}}" | json_pp; done
for i in `grep -l '"type":"TakerPaymentSpendFailed"' DB/*/SWAPS/MY/* | cut -d "/" -f 5 | cut -d "." -f 1`; do echo $i && curl -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"recover_funds_of_swap\",\"params\":{\"uuid\":\"$i\"}}" | json_pp; done
it looks in all files for "MakerPaymentRefundFailed" and "TakerPaymentSpendFailed" and calls recover_funds_of_swap with the uuid. this is needed because the automatic refund sometimes fails with "non-final" error, so only a manual call will refund those swaps
btw, what will we do with the users whose swap files need to be manually edited before refund? will it be possible to edit the stuff in the DB?
and on the makers i need them to refund... i need to call this manually from time to time
## maker for i in `grep -l '"type":"MakerPaymentRefundFailed"' DB/*/SWAPS/MY/* | cut -d "/" -f 5 | cut -d "." -f 1`; do echo $i && curl > -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"recover_funds_of_swap\",\"params\":{\"uuid\":\"$i\"}}" | json_pp; done for i in `grep -l '"type":"TakerPaymentSpendFailed"' DB/*/SWAPS/MY/* | cut -d "/" -f 5 | cut -d "." -f 1`; do echo $i && curl -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"recover_funds_of_swap\",\"params\":{\"uuid\":\"$i\"}}" | json_pp; doneit looks in all files for "MakerPaymentRefundFailed" and "TakerPaymentSpendFailed" and calls recover_funds_of_swap with the uuid. this is needed because the automatic refund sometimes fails with "non-final" error, so only a manual call will refund those swaps
Sorry for the late response @cipig, For v2, you can call my_recent_swaps and do the same.
btw, what will we do with the users whose swap files need to be manually edited before refund? will it be possible to edit the stuff in the DB?
Will add it to the trading protocol upgrade checklist https://github.com/KomodoPlatform/komodo-defi-framework/issues/1895#issue-1786470565 Maybe we can add an rpc to let you edit swap data / events in DB. We shouldn't need to manually edit swap data but sometimes it's inevitable.
Sorry for the late response @cipig, For v2, you can call
my_recent_swapsand do the same.
Only if my_recent_swaps contain the error messages/events that happened during the swap. I search for MakerPaymentRefundFailed and TakerPaymentSpendFailed in the JSONs and then call recover_funds_of_swap for all swap uuids that had this errors. I can't do that for all swaps, that would be way too much.
Only if my_recent_swaps contain the error messages/events that happened during the swap
It does for both v1 and v2 swaps https://komodoplatform.com/en/docs/komodo-defi-framework/api/legacy/my_recent_swaps/#response-success , we can even add filters for specific events in the future to make life easier.