Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,78 @@ jobs:
env:
BITCOIND_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/corepc/bitcoind
run: cd integration_test && cargo test --features=${{ matrix.version }},download

# The jobs below copied from electrsd repo during import. Not too
# much further thought given to it.
test-electrs:
name: Test Electrs
runs-on: ubuntu-24.04
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
strategy:
matrix:
features:
- bitcoind_22_1,electrs_0_8_10
- bitcoind_22_1,electrs_0_9_1
- bitcoind_22_1,electrs_0_9_11
- bitcoind_22_1,electrs_0_10_6
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
- run: cd electrsd && cargo test --features ${{ matrix.features }}


test-electrs-esplora:
name: Test Electrs Esplora
runs-on: ubuntu-24.04
env:
CARGO_TERM_COLOR: always
strategy:
matrix:
features: ["bitcoind_22_1,legacy,esplora_a33e97e1"]

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
- run: cd electrsd && cargo test --features ${{ matrix.features }}

test-electrs-no-download:
name: Test Electrs no auto-download features
runs-on: ubuntu-24.04
env:
CARGO_TERM_COLOR: always
ELECTRS_EXEC: "/home/runner/.cargo-install/electrs/bin/electrs"
steps:
- uses: dtolnay/rust-toolchain@stable
- name: Install LLVM and Clang
run: |
sudo apt-get update -y
sudo apt-get install -y clang libclang-dev llvm-dev

llvm_config="$(command -v llvm-config || true)"
if [[ -z "$llvm_config" ]]; then
llvm_config="$(command -v llvm-config-18 || true)"
fi

if [[ -z "$llvm_config" ]]; then
echo "llvm-config not found after installing LLVM packages" >&2
exit 1
fi

echo "LLVM_CONFIG_PATH=$llvm_config" >> "$GITHUB_ENV"
echo "LIBCLANG_PATH=$($llvm_config --libdir)" >> "$GITHUB_ENV"
- name: Install electrs
# Automatically cache installed binaries to avoid compiling them each run
uses: baptiste0928/cargo-install@v2
with:
crate: electrs
- run: "echo $ELECTRS_EXEC"
- name: Checkout Crate
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cd electrsd && cargo test --features 'bitcoind_25_2'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

Cargo.lock
**/target

# Copied from electsd repo during import.
.idea/
bin/
36 changes: 18 additions & 18 deletions Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ dependencies = [
"serde",
]

[[package]]
name = "bitcoind"
version = "0.37.0"
dependencies = [
"anyhow",
"bitcoin_hashes",
"bitreq",
"corepc-client",
"env_logger",
"flate2",
"log",
"serde_json",
"tar",
"tempfile",
"which",
"zip",
]

[[package]]
name = "bitflags"
version = "2.10.0"
Expand Down Expand Up @@ -248,24 +266,6 @@ dependencies = [
"serde_json",
]

[[package]]
name = "corepc-node"
version = "0.12.0"
dependencies = [
"anyhow",
"bitcoin_hashes",
"bitreq",
"corepc-client",
"env_logger",
"flate2",
"log",
"serde_json",
"tar",
"tempfile",
"which",
"zip",
]

[[package]]
name = "corepc-types"
version = "0.12.0"
Expand Down
36 changes: 18 additions & 18 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ dependencies = [
"serde",
]

[[package]]
name = "bitcoind"
version = "0.37.0"
dependencies = [
"anyhow",
"bitcoin_hashes",
"bitreq",
"corepc-client",
"env_logger",
"flate2",
"log",
"serde_json",
"tar",
"tempfile",
"which",
"zip",
]

[[package]]
name = "bitflags"
version = "2.10.0"
Expand Down Expand Up @@ -248,24 +266,6 @@ dependencies = [
"serde_json",
]

[[package]]
name = "corepc-node"
version = "0.12.0"
dependencies = [
"anyhow",
"bitcoin_hashes",
"bitreq",
"corepc-client",
"env_logger",
"flate2",
"log",
"serde_json",
"tar",
"tempfile",
"which",
"zip",
]

[[package]]
name = "corepc-types"
version = "0.12.0"
Expand Down
16 changes: 2 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
[workspace]
members = [ "bitreq", "client", "fuzz", "jsonrpc", "node", "types"]
exclude = ["integration_test", "verify"]
members = ["bitcoind", "bitreq", "client", "fuzz", "jsonrpc", "types"]
exclude = ["integration_test", "verify", "electrsd"]
resolver = "2"
rust-version = "1.75.0"

[patch.crates-io.corepc-client]
path = "client"

[patch.crates-io.jsonrpc]
path = "jsonrpc"

[patch.crates-io.corepc-node]
path = "node"

[patch.crates-io.corepc-types]
path = "types"

[workspace.metadata.rbmt.toolchains]
nightly = "nightly-2025-09-12"
stable = "1.94.1"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions node/Cargo.toml → bitcoind/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "corepc-node"
version = "0.12.0"
name = "bitcoind"
version = "0.37.0"
authors = ["Riccardo Casatta <riccardo@casatta.it>", "Tobin C. Harding <me@tobin.cc>"]
license = "MIT"
repository = "https://github.com/rust-bitcoin/corepc"
Expand Down Expand Up @@ -75,7 +75,7 @@ features = ["28_2"]
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.rbmt.lint]
# The node crate requires a version feature to compile; use `latest` for per-package lint.
# The bitcoind crate requires a version feature to compile; use `latest` for per-package lint.
features = ["latest"]
# Duplicates from build-dep/dep splits, --target=all, or upstream version conflicts.
allowed_duplicates = [
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions node/README.md → bitcoind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ When you don't use the auto-download feature you have the following options:

```rust
if let Ok(exe_path) = corepc_node::exe_path() {
let node = corepc_node::Node::new(exe_path).unwrap();
let node = corepc_node::BitcoinD::new(exe_path).unwrap();
assert_eq!(0, node.client.get_blockchain_info().unwrap().blocks);
}
```

Startup options could be configured via the [`Conf`] struct using [`Node::with_conf`] or
Startup options could be configured via the [`Conf`] struct using [`BitcoinD::with_conf`] or
`Node::from_downloaded_with_conf`

## Features
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading