Skip to content
Draft
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
57 changes: 52 additions & 5 deletions .github/workflows/build_electrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,72 @@ jobs:
name: electrs_${{ env.RUNNER_OS_LOWER }}_${{ env.ELECTRS_TAG }}
path: target/release/electrs


build-electrs-esplora:
name: Build Electrs Esplora
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15]
os: [ubuntu-22.04, macos-14]
env:
ELECTRS_COMMIT: "a33e97e1a1fc63fa9c20a116bb92579bbf43b254"
ELECTRS_COMMIT: "027e38d3ebc2f85b28ae76f8f3448438ee4fc7b1"
RUST_VERSION: "1.75.0"

steps:
- name: Check out Electrs
uses: actions/checkout@master
with:
repository: Blockstream/electrs
ref: ${{ env.ELECTRS_COMMIT }}
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install LLVM (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y llvm-dev libclang-dev clang
- name: Set up build environment (macOS)
if: runner.os == 'macOS'
run: |
echo "LIBCLANG_PATH=$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=-isysroot $(xcrun --show-sdk-path)" >> $GITHUB_ENV
- run: cargo build --release --locked --features liquid
- name: downcase runner.os
run: echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]' | echo RUNNER_OS_LOWER=$(</dev/stdin) >>${GITHUB_ENV}
- name: Upload libs
uses: actions/upload-artifact@v4
with:
name: electrs_${{ env.RUNNER_OS_LOWER }}_esplora_${{ env.ELECTRS_COMMIT }}
path: target/release/electrs

build-electrs-esplora-ee3646fc:
name: Build Electrs Esplora - ee3646fc
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14]
env:
ELECTRS_COMMIT: "ee3646fc4a6a3f407fae3cf726c31c3230cddc52"
RUST_VERSION: "1.75.0"

steps:
- name: Check out Electrs
uses: actions/checkout@master
with:
repository: Blockstream/electrs
ref: ${{ env.ELECTRS_COMMIT }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install LLVM (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y llvm-dev libclang-dev clang
- name: Set up build environment (macOS)
if: runner.os == 'macOS'
run: |
echo "LIBCLANG_PATH=$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=-isysroot $(xcrun --show-sdk-path)" >> $GITHUB_ENV
- run: cargo build --release --locked --features liquid
- name: downcase runner.os
run: echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]' | echo RUNNER_OS_LOWER=$(</dev/stdin) >>${GITHUB_ENV}
- name: Upload libs
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ jobs:
CARGO_TERM_COLOR: always
strategy:
matrix:
features: ["corepc-node_22_1,legacy,esplora_a33e97e1"]
features:
- corepc-node_22_1,legacy,esplora_a33e97e1
- corepc-node_28_2,legacy,esplora_ee3646fc

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ legacy = []
download = ["bitcoin_hashes", "zip", "minreq"]

esplora_a33e97e1 = ["download", "legacy"]
esplora_ee3646fc = ["download", "legacy"] # commit: ee3646fc4a6a3f407fae3cf726c31c3230cddc52
electrs_0_8_10 = ["download"]
electrs_0_9_1 = ["download"]
electrs_0_9_11 = ["download"]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ I used integration testing based on external bash script launching needed extern
* [electrs 0.9.1](https://github.com/romanz/electrs/releases/tag/v0.9.1) (feature=electrs_0_9_1)
* [electrs 0.8.10](https://github.com/romanz/electrs/releases/tag/v0.8.10) (feature=electrs_0_8_10)
* [electrs esplora](https://github.com/Blockstream/electrs/tree/a33e97e1a1fc63fa9c20a116bb92579bbf43b254) (feature=esplora_a33e97e1)
* [electrs esplora](https://github.com/Blockstream/electrs/tree/ee3646fc4a6a3f407fae3cf726c31c3230cddc52) (feature=esplora_ee3646fc)

Thanks to these features every `#[test]` could easily run isolated with its own environment

Expand Down
2 changes: 2 additions & 0 deletions sha256
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2d5ff149e8a2482d3658e9b386830dfc40c8fbd7c175ca7cbac58240a9505bcd electrs_macos_esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254.zip
865e26a96e8df77df01d96f2f569dcf9622fc87a8d99a9b8fe30861a4db9ddf1 electrs_linux_esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254.zip
a9626866a3ec2fa444ccacac4b36f3ce7578cb18b8e37f4b82cb8071128f8202 electrs_macos_esplora_ee3646fc4a6a3f407fae3cf726c31c3230cddc52.zip
ba322ab3283c0e327e21562d6e47c21dc64d442947bd4ef8e05ba1375b8121ea electrs_linux_esplora_ee3646fc4a6a3f407fae3cf726c31c3230cddc52.zip
0459d493d399bdb9ef145c84125c3cd26c1993a48efe59fa9d3fa13a03b2f555 electrs_linux_v0.8.10.zip
48c857ca953ea66ee31c4da5a801298c85815e792ab57291107e77a4871d5421 electrs_macos_v0.8.10.zip
fee5cc9b6c8bbd3adc45c63c881844d948c1b4dd6817f99ee087a0ccc4ba3be0 electrs_linux_v0.9.1.zip
Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl Default for Conf<'_> {
let args = if cfg!(feature = "electrs_0_9_1")
|| cfg!(feature = "electrs_0_8_10")
|| cfg!(feature = "esplora_a33e97e1")
|| cfg!(feature = "esplora_ee3646fc")
|| cfg!(feature = "legacy")
{
vec!["-vvv"]
Expand Down Expand Up @@ -217,6 +218,7 @@ impl ElectrsD {
let p2p_socket;
if cfg!(feature = "electrs_0_8_10")
|| cfg!(feature = "esplora_a33e97e1")
|| cfg!(feature = "esplora_ee3646fc")
|| cfg!(feature = "legacy")
{
args.push("--jsonrpc-import");
Expand Down Expand Up @@ -479,7 +481,10 @@ mod test {
debug!("electrs: {}", &electrs_exe);
let mut conf = corepc_node::Conf::default();
conf.view_stdout = log_enabled!(Level::Debug);
if !cfg!(feature = "electrs_0_8_10") && !cfg!(feature = "esplora_a33e97e1") {
if !cfg!(feature = "electrs_0_8_10")
&& !cfg!(feature = "esplora_a33e97e1")
&& !cfg!(feature = "esplora_ee3646fc")
{
conf.p2p = P2P::Yes;
}
let bitcoind = corepc_node::Node::with_conf(&bitcoind_exe, &conf).unwrap();
Expand Down
5 changes: 5 additions & 0 deletions src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const VERSION: &str = "v0.8.10";
#[cfg(feature = "esplora_a33e97e1")]
const VERSION: &str = "esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254";

#[cfg(feature = "esplora_ee3646fc")]
const VERSION: &str = "esplora_ee3646fc4a6a3f407fae3cf726c31c3230cddc52";

#[cfg(feature = "electrs_0_9_1")]
const VERSION: &str = "v0.9.1";

Expand All @@ -28,6 +31,7 @@ const VERSION: &str = "v0.10.6";
feature = "electrs_0_9_11",
feature = "electrs_0_10_6",
feature = "esplora_a33e97e1",
feature = "esplora_ee3646fc",
)))]
const VERSION: &str = "NA";

Expand All @@ -37,6 +41,7 @@ pub const HAS_FEATURE: bool = cfg!(any(
feature = "electrs_0_9_11",
feature = "electrs_0_10_6",
feature = "esplora_a33e97e1",
feature = "esplora_ee3646fc",
));

pub fn electrs_name() -> String {
Expand Down
Loading