Commit Graph

1008 Commits (master)

Author SHA1 Message Date
Byron Hambly a19501a002
Revert "Monero wallet refresh fix (#1487)"
This reverts commit d8dacbdee9.
2 months ago
binarybaron d8dacbdee9
Monero wallet refresh fix (#1487)
* Upgrade monero-wallet-rpc to `v0.18.3.1`

* Give feedback to user about state of monero refresh and retry if fails

This commit changes the following behaviour in the refresh functionality of the monero wallet
- Allows for multiple retries because in some cases users have experienced an issue where the wallet rpc returns `no connection to daemon` even though the daemon is available. I'm not 100% sure why this happens but retrying often fixes the issue
- Attempt to print the current sync height while the wallet is syncing. This only works to some degree because the `monero-wallet-rpc` stops responding (or takes a long time to respond) while it's refreshing
- The `monero-wallet-rpc` is started with the `--no-initial-sync` flag which ensures that as soon as it's started, it's ready to respond to requests
---------

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
Co-authored-by: Byron Hambly <byron@hambly.dev>
2 months ago
Ian McKenzie eb15f477fa
Verify hashes of monero cli on download (#1572)
* Bump Monero CLI for macos aarch64 to match other platforms

* Check hash on download of monero cli

* change panic to bail

---------

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2 months ago
Ian McKenzie 140dc6dc04
Upgrade to vergen 8.3, move to git describe --dirty --tags for semver (#1543)
* Upgrade to vergen 8.3, move to git describe --dirty --tags for semver

* Add newline to build.rs
4 months ago
Byron Hambly dcf9f24b77
build(deps): bump pem to 3.0
replaces #1415

also fixes the `seed_from_pem_fails_for_long_seed` unit test, which was
"passing" but not actually testing what it meant to.
7 months ago
pokkst 5182b4f53a
Update lock timeout to 10 min 8 months ago
binarybaron 3467523849 Dynamically choose monero daemon to connect to 9 months ago
binarybaron 2e1909685d
Revert "Refresh monero monitoring wallet at startup to ensure daemon is is av…" 9 months ago
binarybaron 844ebc7de3 Refresh monero monitoring wallet at startup to ensure daemon is is available 9 months ago
bors[bot] d0a35ab21b
Merge #1428
1428: Fix issue where Windows cannot open ASB wallet to create lock XMR transaction r=delta1 a=pokkst

It seems on Windows that opening an already opened wallet results in an error/crash. This does not seem to be the case for Linux and macOS. Removing this line fixed the issue on Windows, and had no regressions on macOS/Linux from my testing.

Co-authored-by: pokkst <pokkst@protonmail.com>
9 months ago
binarybaron 2e181dac9c Immediately sync bitcoin tx status upon subscribing 9 months ago
pokkst d7d87d96ac
Maybe fix issue on Windows where the wallet cannot open during XMR locking phase
(cherry picked from commit 879cb8bc0131b8a059466ca00ae9f7842c4ac018)
9 months ago
Byron Hambly 5e192acac2
feat(asb): allow asb to register with mulitple rendezvous nodes 10 months ago
Byron Hambly acdba8474b
build(deps): update rust-toolchain to 1.67 and bump uuid to 1.4
some of the dependency updates are requiring a higher version of the
rust toolchain. bump to 1.67 and fix new clippy lints.

also fix dprint to 0.39.1 because 0.40 has breaking changes.
10 months ago
Byron Hambly 00cfce57c7
chore: fix dprint config and run fmt 1 year ago
Byron Hambly 43f06f0705
build(deps): bump base64 to 0.21
closes #1271
1 year ago
Byron Hambly 4ca1f8da5e
ci: update msrv and github actions toolchains 1 year ago
Byron Hambly 9346cb7baf
fix: add debug log for opening monero wallet error 1 year ago
Byron Hambly f39e1de964
feat(swap): merge cancel/refund commands into one command 1 year ago
binarybaron b6201192c2 Allow asb to set a bitcoin address that is controlled by the asb itself to redeem/punish Bitcoin to 1 year ago
binarybaron 39895a176f
Merge branch 'master' into monero-unlocked-balance 1 year ago
Byron Hambly 98296d8fa6
feat(asb): allow config overrides from env vars
- upgrades config crate to 0.13.2 #1087
- adds environment source for config overrides
1 year ago
Byron Hambly 55e7d3f425
Merge branch 'master' into monero-unlocked-balance 1 year ago
Byron Hambly 08426d8171
fixup! fix(asb): use unlocked monero balance for quotes 1 year ago
bors[bot] e5e7de757e
Merge #1225
1225: fix(cli, asb): print update warning correctly formatted r=delta1 a=binarybaron



Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2 years ago
binarybaron 52871c9fc8 Print update warning correctly formatted 2 years ago
Byron Hambly cd3ba4905a
feat: add wallet database migration from older bdk
- upgrades to bdk 0.24 #1198
- adds a regression test for opening older wallets #1183
- adds a migration for older wallets that encounter the ChecksumMismatch
  error #1182
2 years ago
binarybaron 4f89b3d768 Add monero-wallet-rpc `DOWNLOAD_URL` for M1, M2 Mac 2 years ago
binarybaron f09b237e15
Immediately fetch transaction status upon subscription
Immediately fetch transaction status upon subscription instead of waiting 1 minute

(cherry picked from commit 5662f7fe81)
2 years ago
Byron Hambly 3d12631d69
feat: upgrade monero images to v0.18.1.2 2 years ago
Byron Hambly f224c49584
fix(asb): use unlocked monero balance for quotes 2 years ago
Byron Hambly fb42ca13cc
chore: clippy fix 2 years ago
Byron Hambly 2c2fb7f350
deps(build): upgrade ecdsa_fun and sigma_fun
- #1139
- #1140
2 years ago
Byron Hambly 6e7e39eea4
build(deps): upgrade bdk, ecdsa_fun, sigma_fun, sha2, bitcoin-harness, serde
- bdk to 0.22.0 #1126
- ecdsa_fun to 7c3d592 #1127
- sigma_fun to 7c3d592 #1128
- sha2 to 0.10.2 #948
- serde to 1.0.144 #1115
- bitcoin-harness to bff9a64

Revert "ci: specify previous dprint version until fixed"
This reverts commit 11eb1737ce.
2 years ago
Byron Hambly bf23eee0cb
docs: add gpg key readme and delta1.asc 2 years ago
Byron Hambly 249e97826f
feat: check swap cli wallet rpc version and remove if not fluorine fermi
- swap cli will check its wallet rpc version and delete the binary if
  its version does not match on "Fluorine Fermi". it will then download
  the newer version.
- adds download progress for wallet rpc
2 years ago
Byron Hambly 0a7a27327e
feat: upgrade to monero 0.18 2 years ago
bors[bot] 0d794a13d0
Merge #1008
1008: Upgrade libp2p and stabilized the version r=delta1 a=lescuer97

This is an upgrade for libp2p, I did a previous PR but got mixed up with rebases

Co-authored-by: leonardo <leoescuer@protonmail.com>
Co-authored-by: Leonardo Escuer <47948594+lescuer97@users.noreply.github.com>
Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2 years ago
Byron Hambly 4b09ffd4df
refactor: check for latest release
DRYs up the code for checking latest release from github.
2 years ago
Byron Hambly 493324ce1b
Merge remote-tracking branch 'upstream/master' into latest_version_check 2 years ago
Byron Hambly 7838442947
fix: review comments from binarybaron 2 years ago
Byron Hambly dc68344b62
chore: formatting in select! macro 2 years ago
Byron Hambly ec169916d6
Merge branch 'master' into libp2p_upgrade 2 years ago
bors[bot] a9d9250af1
Merge #1088
1088: feat: add debugging info for failed to fetch transaction r=delta1 a=delta1

Add the jsonrpc error message and data to tracing calls to try debug #1061 "monero-wallet-rpc failed to fetch transaction"

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2 years ago
Byron Hambly 7e4af68cba
feat: add debugging info for failed to fetch transaction
Add the jsonrpc error message and data to tracing calls to try debug #1061
"monero-wallet-rpc failed to fetch transaction"
2 years ago
bors[bot] cb7a7f58b2
Merge #1086
1086: fix btc for xmr calculation error r=delta1 a=delta1

The calculation overflow fix in #1068 did not account for XMR < 1 which
resulted in truncation when dividing by the PICO_OFFSET.

This commit uses `Decimal` to do the calculation at fixed precision and
adds a number of test values to verify the calculation.

Closes #1084

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2 years ago
Byron Hambly 86d57453cf
fix: fix btc for xmr calculation error
The calculation overflow fix in #1068 did not account for XMR < 1 which
resulted in truncation when dividing by the PICO_OFFSET.

This commit uses `Decimal` to do the calculation at fixed precision and
adds a number of test values to verify the calculation.

Closes #1084
2 years ago
Byron Hambly dc706c584a
feat(swap): show min deposit required for min_quantity 2 years ago
Byron Hambly 39e34a608b
fix: fix potential overflow in `max_bitcoin_for_price`
In testing, ASB panicked in `max_bitcoin_for_price` when the Monero
balance x Bitcoin price was enough to overflow `u64`.

This commit changes the function to do the piconero offset division
first, and then to use `checked_mul` to return None if the calculation
would overflow. This required changing the function return
signature to an `Option`. Additional tests for the function were also added.

MONERO_FEE was changed from 0.000030 to 0.000016, which is still
double the current median transaction fee listed at
https://www.monero.how/monero-transaction-fees as of 2022-07-28.
2 years ago
Byron Hambly 8eff499a63
fix: change logs to UTC due to bug in time crate
On Linux and macOS, no program output was being observed.
This is referenced in the [LocalTime] docs for `tracing-subscriber`,
which links to this [unsoundness issue] in the time crate.

Rather than introducing a possible vector for undefined behaviour and
segfaults, I have just changed the logging to use UTC time instead.

When running the ASB as a systemd service, one would generally use the
`--disable-timestamps` flag anyway as systemd adds its own timestamps
which can be local to the server.

If the situation with `tracing-subscriber` and the time crate is fixed
then this can be updated.

This commit also updates the `tracing-subscriber` and `tracing-appender`
dependencies, closing #987.

[LocalTime]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.LocalTime.html
[unsoundness issue]: https://github.com/time-rs/time/issues/293#issuecomment-748151025
2 years ago