Merge remote-tracking branch 'upstream/master' into rpc-server

and resolve conflicts
This commit is contained in:
Byron Hambly 2024-05-22 14:15:17 +02:00
commit 38f6f32971
No known key found for this signature in database
GPG Key ID: DE8F6EA20A661697
11 changed files with 110 additions and 54 deletions

View File

@ -20,6 +20,9 @@ jobs:
archive_ext: tar
- bin: swap
target: x86_64-apple-darwin
os: macos-12
- bin: swap
target: aarch64-apple-darwin
os: macos-latest
archive_ext: tar
- bin: swap
@ -36,6 +39,10 @@ jobs:
archive_ext: tar
- bin: asb
target: x86_64-apple-darwin
os: macos-12
archive_ext: tar
- bin: asb
target: aarch64-apple-darwin
os: macos-latest
archive_ext: tar
- bin: asb
@ -45,7 +52,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tagged commit
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.release.target_commitish }}
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: dtolnay/rust-toolchain@master
with:
@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: Swatinem/rust-cache@v2.7.3
@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: Swatinem/rust-cache@v2.7.3
@ -70,13 +70,15 @@ jobs:
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-12
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: Swatinem/rust-cache@v2.7.3
@ -129,7 +131,7 @@ jobs:
tool-cache: false
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: Swatinem/rust-cache@v2.7.3
@ -166,7 +168,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
- uses: Swatinem/rust-cache@v2.7.3
@ -183,3 +185,16 @@ jobs:
- name: Run RPC server tests
run: cargo test --package swap --all-features --test rpc -- --nocapture
check_stable:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2.7.3
- name: Run cargo check on stable rust
run: cargo check --all-targets

View File

@ -11,7 +11,7 @@ jobs:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.6
- name: Extract version from branch name
id: extract-version

View File

@ -12,7 +12,7 @@ jobs:
name: "Draft a new release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.6
with:
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}
@ -20,7 +20,7 @@ jobs:
run: git checkout -b release/${{ github.event.inputs.version }}
- name: Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@2.0.0
uses: thomaseizinger/keep-a-changelog-new-release@3.0.0
with:
version: ${{ github.event.inputs.version }}
changelogPath: CHANGELOG.md
@ -58,7 +58,7 @@ jobs:
run: git push origin release/${{ github.event.inputs.version }} --force
- name: Create pull request
uses: thomaseizinger/create-pull-request@1.3.1
uses: thomaseizinger/create-pull-request@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.BOTTY_GITHUB_TOKEN }}
head: release/${{ github.event.inputs.version }}

View File

@ -10,7 +10,7 @@ jobs:
name: Create preview release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.6
- name: Delete 'preview' release
uses: larryjoelane/delete-release-action@v1.0.24

77
Cargo.lock generated
View File

@ -98,9 +98,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.81"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arrayref"
@ -154,9 +154,9 @@ dependencies = [
[[package]]
name = "async-trait"
version = "0.1.78"
version = "0.1.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85"
checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
@ -275,9 +275,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
version = "0.22.0"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "bdk"
@ -1018,9 +1018,9 @@ dependencies = [
[[package]]
name = "data-encoding"
version = "2.5.0"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
name = "deranged"
@ -1739,9 +1739,9 @@ dependencies = [
[[package]]
name = "hyper"
version = "1.2.0"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a"
checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d"
dependencies = [
"bytes",
"http 1.0.0",
@ -1879,9 +1879,9 @@ dependencies = [
[[package]]
name = "itertools"
version = "0.12.1"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
@ -2954,11 +2954,11 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
[[package]]
name = "pem"
version = "3.0.3"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310"
checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
dependencies = [
"base64 0.21.7",
"base64 0.22.1",
"serde",
]
@ -3908,9 +3908,9 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.197"
version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
dependencies = [
"serde_derive",
]
@ -3937,9 +3937,9 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.197"
version = "1.0.202"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
dependencies = [
"proc-macro2",
"quote",
@ -3948,9 +3948,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.115"
version = "1.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
dependencies = [
"itoa",
"ryu",
@ -4443,7 +4443,7 @@ dependencies = [
"async-trait",
"atty",
"backoff",
"base64 0.22.0",
"base64 0.22.1",
"bdk",
"big-bytes",
"bitcoin",
@ -4462,8 +4462,8 @@ dependencies = [
"futures",
"get-port",
"hex",
"hyper 1.2.0",
"itertools 0.12.1",
"hyper 1.3.1",
"itertools 0.13.0",
"jsonrpsee",
"jsonrpsee-core",
"libp2p",
@ -4495,7 +4495,7 @@ dependencies = [
"tempfile",
"testcontainers",
"thiserror",
"time 0.3.34",
"time 0.3.36",
"tokio",
"tokio-socks",
"tokio-tar",
@ -4625,18 +4625,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.58"
version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.58"
version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
@ -4664,9 +4664,9 @@ dependencies = [
[[package]]
name = "time"
version = "0.3.34"
version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
@ -4687,9 +4687,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
version = "0.2.17"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",
@ -4838,9 +4838,9 @@ dependencies = [
[[package]]
name = "tokio-util"
version = "0.7.10"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1"
dependencies = [
"bytes",
"futures-core",
@ -4848,7 +4848,6 @@ dependencies = [
"futures-sink",
"pin-project-lite 0.2.13",
"tokio",
"tracing",
]
[[package]]
@ -4955,7 +4954,7 @@ checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf"
dependencies = [
"crossbeam-channel",
"thiserror",
"time 0.3.34",
"time 0.3.36",
"tracing-subscriber 0.3.18",
]
@ -5056,7 +5055,7 @@ dependencies = [
"serde_json",
"sharded-slab",
"thread_local",
"time 0.3.34",
"time 0.3.36",
"tracing",
"tracing-core",
"tracing-log 0.2.0",
@ -5301,7 +5300,7 @@ dependencies = [
"cfg-if 1.0.0",
"git2",
"rustversion",
"time 0.3.34",
"time 0.3.36",
]
[[package]]

View File

@ -164,3 +164,38 @@ May 01 01:32:05.018 INFO Tor found. Setting up hidden service.
May 01 01:32:07.475 INFO /onion3/z4findrdwtfbpoq64ayjtmxvr52vvxnsynerlenlfkmm52dqxsl4deyd:9939
May 01 01:32:07.476 INFO /onion3/z4findrdwtfbpoq64ayjtmxvr52vvxnsynerlenlfkmm52dqxsl4deyd:9940
```
### Exporting the Bitcoin wallet descriptor
First use `swap` or `asb` with the `export-bitcoin-wallet` subcommand.
Output example:
```json
{"descriptor":"wpkh(tprv8Zgredacted.../84'/1'/0'/0/*)","blockheight":2415616,"label":"asb-testnet"}
```
The wallet can theoretically be directly imported into
[bdk-cli](https://bitcoindevkit.org/bdk-cli/installation/) but it is easier to
use Sparrow Wallet.
Sparrow wallet import works as follows:
- File -> New wallet -> Give it a name
- Select "New or Imported Software Wallet"
- Click "Enter Private Key" for "Master Private Key (BIP32)"
- Enter the `xprv...` or `tprv...` part of the descriptor (example above is `tprv8Zgredacted...`:
![image](enter-master-private-key.png)
- Click "Import"
- Leave the derivation path as `m/84'/0'/0'` and click "Import Keystore" button
- Click "Apply" and then supply password
![image](import-keystore.png)
- Click Transactions tab
- ???
- Profit!
![image](transactions-tab.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -23,7 +23,7 @@ comfy-table = "7.1"
config = { version = "0.14", default-features = false, features = [ "toml" ] }
conquer-once = "0.4"
curve25519-dalek = { package = "curve25519-dalek-ng", version = "4" }
data-encoding = "2.5"
data-encoding = "2.6"
dialoguer = "0.11"
digest = "0.10.7"
directories-next = "2"
@ -31,7 +31,7 @@ ecdsa_fun = { git = "https://github.com/LLFourn/secp256kfun", default-features =
ed25519-dalek = "1"
futures = { version = "0.3", default-features = false }
hex = "0.4"
itertools = "0.12"
itertools = "0.13"
jsonrpsee = { version = "0.16.2", features = [ "server" ] }
jsonrpsee-core = "0.16.2"
libp2p = { version = "0.42.2", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous", "identify" ] }
@ -79,8 +79,8 @@ zip = "0.5"
[dev-dependencies]
bitcoin-harness = "0.2.2"
get-port = "3"
hyper = "1.2"
jsonrpsee = { version = "0.16.2", features = [ "ws-client" ] }
hyper = "1.3"
mockito = "1.3.0"
monero-harness = { path = "../monero-harness" }
port_check = "0.2"