Skip to content

Commit 5656141

Browse files
committed
Merge #542: Import electrsd and rename corepc-node back to bitcoind
4b080fc CI: Fix test-electrs-no-download (Tobin C. Harding) 980ef98 Run the formatter (Tobin C. Harding) 89765dd electrsd: Bump MSRV to 1.75 (Tobin C. Harding) d6a5162 CI: Tie elects into CI correctly (Tobin C. Harding) 186b3b6 electsd: Set correct repository (Tobin C. Harding) f6d37fc electrsd: Bump version to 0.37.0 (Tobin C. Harding) 6866528 Remove patch sections (Tobin C. Harding) c308f59 Rename corepc-node to bitcoind (Tobin C. Harding) af4fe0e electrsd: Add support for Core 30.2 (Tobin C. Harding) 7ebc5b1 CI: Copy jobs from electrsd repo (Tobin C. Harding) 8062f29 electrs: Upgrade to v0.12.0 deps using path (Tobin C. Harding) ff62e02 Import electrsd (Tobin C. Harding) Pull request description: Just so its clear. Here we import `electrsd` and bump the version so we can release it. We also re-name `corepc-node` back to the original name `bitcoind` and bump the version so it can be released also. Tested with `cargo publish -p bitcoind --dry-run` This is another attempt at #403. That one was so long ago I'm keeping it for the record and opening a new one. This was done while `electrsd` is at commit: `d2fd8af upgrade electrs esplora`. The full commit hash is in the git log. ACKs for top commit: jamillambert: ACK 4b080fc Tree-SHA512: ac6a35b0f53d1cc9cec632d8fdce8258d3b4dae78a34eecd9b7221129f68b6c0700d322f8304c5173691aad213717eb7267763e6a7fbf1e6513d8ebcac4a93bd
2 parents 30be5fd + 4b080fc commit 5656141

68 files changed

Lines changed: 1428 additions & 380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/rust.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,78 @@ jobs:
162162
env:
163163
BITCOIND_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/corepc/bitcoind
164164
run: cd integration_test && cargo test --features=${{ matrix.version }},download
165+
166+
# The jobs below copied from electrsd repo during import. Not too
167+
# much further thought given to it.
168+
test-electrs:
169+
name: Test Electrs
170+
runs-on: ubuntu-24.04
171+
env:
172+
CARGO_TERM_COLOR: always
173+
RUST_LOG: debug
174+
strategy:
175+
matrix:
176+
features:
177+
- bitcoind_22_1,electrs_0_8_10
178+
- bitcoind_22_1,electrs_0_9_1
179+
- bitcoind_22_1,electrs_0_9_11
180+
- bitcoind_22_1,electrs_0_10_6
181+
fail-fast: false
182+
183+
steps:
184+
- uses: actions/checkout@v3
185+
- uses: Swatinem/rust-cache@v2
186+
- uses: dtolnay/rust-toolchain@stable
187+
- run: cd electrsd && cargo test --features ${{ matrix.features }}
188+
189+
190+
test-electrs-esplora:
191+
name: Test Electrs Esplora
192+
runs-on: ubuntu-24.04
193+
env:
194+
CARGO_TERM_COLOR: always
195+
strategy:
196+
matrix:
197+
features: ["bitcoind_22_1,legacy,esplora_a33e97e1"]
198+
199+
steps:
200+
- uses: actions/checkout@v3
201+
- uses: Swatinem/rust-cache@v2
202+
- uses: dtolnay/rust-toolchain@stable
203+
- run: cd electrsd && cargo test --features ${{ matrix.features }}
204+
205+
test-electrs-no-download:
206+
name: Test Electrs no auto-download features
207+
runs-on: ubuntu-24.04
208+
env:
209+
CARGO_TERM_COLOR: always
210+
ELECTRS_EXEC: "/home/runner/.cargo-install/electrs/bin/electrs"
211+
steps:
212+
- uses: dtolnay/rust-toolchain@stable
213+
- name: Install LLVM and Clang
214+
run: |
215+
sudo apt-get update -y
216+
sudo apt-get install -y clang libclang-dev llvm-dev
217+
218+
llvm_config="$(command -v llvm-config || true)"
219+
if [[ -z "$llvm_config" ]]; then
220+
llvm_config="$(command -v llvm-config-18 || true)"
221+
fi
222+
223+
if [[ -z "$llvm_config" ]]; then
224+
echo "llvm-config not found after installing LLVM packages" >&2
225+
exit 1
226+
fi
227+
228+
echo "LLVM_CONFIG_PATH=$llvm_config" >> "$GITHUB_ENV"
229+
echo "LIBCLANG_PATH=$($llvm_config --libdir)" >> "$GITHUB_ENV"
230+
- name: Install electrs
231+
# Automatically cache installed binaries to avoid compiling them each run
232+
uses: baptiste0928/cargo-install@v2
233+
with:
234+
crate: electrs
235+
- run: "echo $ELECTRS_EXEC"
236+
- name: Checkout Crate
237+
uses: actions/checkout@v3
238+
- uses: Swatinem/rust-cache@v2
239+
- run: cd electrsd && cargo test --features 'bitcoind_25_2'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
Cargo.lock
44
**/target
5+
6+
# Copied from electsd repo during import.
7+
.idea/
8+
bin/

Cargo-minimal.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,24 @@ dependencies = [
139139
"serde",
140140
]
141141

142+
[[package]]
143+
name = "bitcoind"
144+
version = "0.37.0"
145+
dependencies = [
146+
"anyhow",
147+
"bitcoin_hashes",
148+
"bitreq",
149+
"corepc-client",
150+
"env_logger",
151+
"flate2",
152+
"log",
153+
"serde_json",
154+
"tar",
155+
"tempfile",
156+
"which",
157+
"zip",
158+
]
159+
142160
[[package]]
143161
name = "bitflags"
144162
version = "2.10.0"
@@ -248,24 +266,6 @@ dependencies = [
248266
"serde_json",
249267
]
250268

251-
[[package]]
252-
name = "corepc-node"
253-
version = "0.12.0"
254-
dependencies = [
255-
"anyhow",
256-
"bitcoin_hashes",
257-
"bitreq",
258-
"corepc-client",
259-
"env_logger",
260-
"flate2",
261-
"log",
262-
"serde_json",
263-
"tar",
264-
"tempfile",
265-
"which",
266-
"zip",
267-
]
268-
269269
[[package]]
270270
name = "corepc-types"
271271
version = "0.12.0"

Cargo-recent.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,24 @@ dependencies = [
139139
"serde",
140140
]
141141

142+
[[package]]
143+
name = "bitcoind"
144+
version = "0.37.0"
145+
dependencies = [
146+
"anyhow",
147+
"bitcoin_hashes",
148+
"bitreq",
149+
"corepc-client",
150+
"env_logger",
151+
"flate2",
152+
"log",
153+
"serde_json",
154+
"tar",
155+
"tempfile",
156+
"which",
157+
"zip",
158+
]
159+
142160
[[package]]
143161
name = "bitflags"
144162
version = "2.10.0"
@@ -248,24 +266,6 @@ dependencies = [
248266
"serde_json",
249267
]
250268

251-
[[package]]
252-
name = "corepc-node"
253-
version = "0.12.0"
254-
dependencies = [
255-
"anyhow",
256-
"bitcoin_hashes",
257-
"bitreq",
258-
"corepc-client",
259-
"env_logger",
260-
"flate2",
261-
"log",
262-
"serde_json",
263-
"tar",
264-
"tempfile",
265-
"which",
266-
"zip",
267-
]
268-
269269
[[package]]
270270
name = "corepc-types"
271271
version = "0.12.0"

Cargo.toml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
[workspace]
2-
members = [ "bitreq", "client", "fuzz", "jsonrpc", "node", "types"]
3-
exclude = ["integration_test", "verify"]
2+
members = ["bitcoind", "bitreq", "client", "fuzz", "jsonrpc", "types"]
3+
exclude = ["integration_test", "verify", "electrsd"]
44
resolver = "2"
55
rust-version = "1.75.0"
66

7-
[patch.crates-io.corepc-client]
8-
path = "client"
9-
10-
[patch.crates-io.jsonrpc]
11-
path = "jsonrpc"
12-
13-
[patch.crates-io.corepc-node]
14-
path = "node"
15-
16-
[patch.crates-io.corepc-types]
17-
path = "types"
18-
197
[workspace.metadata.rbmt.toolchains]
208
nightly = "nightly-2025-09-12"
219
stable = "1.94.1"

node/Cargo.toml renamed to bitcoind/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "corepc-node"
3-
version = "0.12.0"
2+
name = "bitcoind"
3+
version = "0.37.0"
44
authors = ["Riccardo Casatta <riccardo@casatta.it>", "Tobin C. Harding <me@tobin.cc>"]
55
license = "MIT"
66
repository = "https://github.com/rust-bitcoin/corepc"
@@ -75,7 +75,7 @@ features = ["28_2"]
7575
rustdoc-args = ["--cfg", "docsrs"]
7676

7777
[package.metadata.rbmt.lint]
78-
# The node crate requires a version feature to compile; use `latest` for per-package lint.
78+
# The bitcoind crate requires a version feature to compile; use `latest` for per-package lint.
7979
features = ["latest"]
8080
# Duplicates from build-dep/dep splits, --target=all, or upstream version conflicts.
8181
allowed_duplicates = [
File renamed without changes.

node/README.md renamed to bitcoind/README.md

Lines changed: 2 additions & 2 deletions
File renamed without changes.

0 commit comments

Comments
 (0)