Skip to content
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

Purge saved trades that failed market price check #2930

Merged
merged 3 commits into from
Jul 12, 2019

Conversation

sqrrm
Copy link
Member

@sqrrm sqrrm commented Jun 29, 2019

This is a way to clean saved failed take offers due to price disagreement. I don't know if there is any other signature apart from the errormessage to uniquely identify such saved failed trades so the matching for purges is done on the error message string.

@sqrrm sqrrm requested a review from ripcurlx June 29, 2019 17:24
@sqrrm sqrrm changed the title Purge saved trades that failed market price check [WIP] Purge saved trades that failed market price check Jun 29, 2019
@sqrrm
Copy link
Member Author

sqrrm commented Jun 29, 2019

This branch is for those that have a broken trade history due to the issue with failed acks on price disagreement. This branch will fix the data dir so they can keep the histories.

@sqrrm sqrrm changed the base branch from master to purge-failed June 29, 2019 21:48
@sqrrm sqrrm changed the title [WIP] Purge saved trades that failed market price check Purge saved trades that failed market price check Jun 29, 2019
@sqrrm
Copy link
Member Author

sqrrm commented Jun 29, 2019

I created a new branch since this should not go into master. That way those that need to clean up their failed offers can do so by building and running from this branch as a one time clean up.

@devinbileck
Copy link
Member

I worry that the barrier of building from source will keep a lot of less technical users from being able to utilize this. Perhaps instead we could implement a separate utility that the user just executes and it repairs their trade history. And if necessary we can also add additional cleanup tasks to this utility in order to resolve other issues that arise. What do you think?

@sqrrm
Copy link
Member Author

sqrrm commented Jun 30, 2019

@devinbileck I agree that building from source is probably too hard for a lot of users. We could build this branch for them as well, like the main release.

Having a separate tool would be perhaps more correct but I don't really see many benefits. This fix is very specific to repair the data dir for a bug that has now been fixed so it's a one time use. The separate tool would have to be maintained just as much as bisq itself if it were to be reused and we would have to build it for different platforms as well. To add any task that users might want to perform regularly in a separate tool doesn't make sense to me. Why wouldn't we just implement that in core to never have the issue in the first place?

@ghost
Copy link

ghost commented Jun 30, 2019

If there is no risk, indeed putting it in the core seems the simplest solution.
And if really this fix will be of limited use, it could be removed in future release when no more needed.

@sqrrm
Copy link
Member Author

sqrrm commented Jun 30, 2019

@HarryMacfinned This is not a suggestion to include it in master for future releases. The suggestion is to keep a separate branch to avoid including it in master and avoid that everyone has to run it. It is basically a full bisq version cleanup tool rather than a purpose built cleanup tool as suggested by @devinbileck

@devinbileck
Copy link
Member

Fair enough. My idea was to have a utility that could purge any trade matching a given criteria. Which could be used to resolve this specific issue and any that arise in the future. I agree it is a little too ambitious at this point requiring implementation and maintenance time. I suppose providing a build of this branch for those that require it should be sufficient at this point.

@a123b
Copy link
Contributor

a123b commented Jul 1, 2019

The faulty trades also need to be purged from the history tab in case the trade already got closed by an arbitrator, see #2925 (comment) Just realized they already do

Don't know if it's not too much work, but how about showing a popup like "Repairs in data directory completed. Please switch to the standard Bisq version now." that closes the app if acknowledged to prevent users from continuing to use the special build?

@sqrrm
Copy link
Member Author

sqrrm commented Jul 1, 2019

@devinbileck That's a good idea, having a separate tool to clean the database selectively. Could be useful for development and testing too. Something to keep in mind going forward that when in doubt, it might be worth building rather than doing some hack to test stuff.

@a123b Perhaps I should add a popup and force shut down after the startup process, including the cleanup, is completed. That way it's not possible to use this version for trading but only as a cleanup tool.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ripcurlx ripcurlx merged commit 0fce37c into bisq-network:purge-failed Jul 12, 2019
@sqrrm sqrrm deleted the purge-failed-take-offers branch September 19, 2019 15:36
@sqrrm sqrrm restored the purge-failed-take-offers branch September 19, 2019 15:36
@sqrrm sqrrm deleted the purge-failed-take-offers branch May 3, 2021 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants