AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
341 stars 44 forks source link

renamed swap database directory #482

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

In https://github.com/AthanorLabs/atomic-swap/pull/480, we upgraded github.com/ChainSafe/chaindb from the non-released commit hash f900218c88f8 above release v0.1.4 of to a release that Chainsafe made 2 weeks ago tagged v0.1.5. The release tag is only changing the patch-level, so it should have been backwards compatible, but, sadly, it is not.

The v0.1.5 chaindb release moves to Badger v4.1.0, whose primary purpose is to fix 6 CVE's.

Attempting to run swapd with an existing database already in place gives this error:

FATAL   cmd     swapd/main.go:228       manifest has unsupported version: 7 (we support 8).
Please see https://dgraph.io/docs/badger/faq/#i-see-manifest-has-unsupported-version-x-we-support-y-error on how to fix this.

This PR gives the database directory a new, more specific, name, to allow startup. That's probably good enough for most people, but we can give the link to that error message in the release notes for anyone that wants to salvage their swap history.

Feel free to suggest alternate ideas, this is just what I came up with.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 84.61% and project coverage change: +0.89 :tada:

Comparison is base (0f1865c) 58.68% compared to head (6ffc244) 59.57%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #482 +/- ## ========================================== + Coverage 58.68% 59.57% +0.89% ========================================== Files 128 128 Lines 12608 12612 +4 ========================================== + Hits 7399 7514 +115 + Misses 4452 4320 -132 - Partials 757 778 +21 ``` | [Impacted Files](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [rpcclient/ws\_methods.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjY2xpZW50L3dzX21ldGhvZHMuZ28=) | `54.16% <0.00%> (ø)` | | | [daemon/swap\_daemon.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZGFlbW9uL3N3YXBfZGFlbW9uLmdv) | `66.36% <100.00%> (ø)` | | | [protocol/xmrtaker/errors.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvZXJyb3JzLmdv) | `90.32% <100.00%> (+1.43%)` | :arrow_up: | | [protocol/xmrtaker/net.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvbmV0Lmdv) | `81.48% <100.00%> (ø)` | | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/482/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.