Skip to content

Commit

Permalink
Merge pull request #6 from alpenlabs/SBP-18-v2
Browse files Browse the repository at this point in the history
btcio: `bitcoind` interface
  • Loading branch information
Rajil1213 authored Nov 2, 2024
2 parents 1091f31 + c071810 commit 453c694
Show file tree
Hide file tree
Showing 15 changed files with 2,377 additions and 26 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
merge_group:
push:
branches: [main]
workflow_dispatch:
inputs:
RUST_LOG:
description: "Log level"
required: false
default: "info"
type: string

env:
CARGO_TERM_COLOR: always
Expand All @@ -21,24 +28,45 @@ jobs:
runs-on: self-hosted
timeout-minutes: 60 # better fail-safe than the default 360 in github actions
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@nightly
- name: Install bitcoind
env:
BITCOIND_VERSION: "28.0"
BITCOIND_ARCH: "x86_64-linux-gnu"
SHASUM: "7fe294b02b25b51acb8e8e0a0eb5af6bbafa7cd0c5b0e5fcbb61263104a82fbc"
run: |
curl -fsSLO --proto "=https" --tlsv1.2 "https://bitcoincore.org/bin/bitcoin-core-${{ env.BITCOIND_VERSION }}/bitcoin-${{ env.BITCOIND_VERSION }}-${{ env.BITCOIND_ARCH }}.tar.gz"
sha256sum -c <<< "$SHASUM bitcoin-${{ env.BITCOIND_VERSION }}-${{ env.BITCOIND_ARCH }}.tar.gz"
tar xzf "bitcoin-${{ env.BITCOIND_VERSION }}-${{ env.BITCOIND_ARCH }}.tar.gz"
sudo install -m 0755 -t /usr/local/bin bitcoin-${{ env.BITCOIND_VERSION }}/bin/*
bitcoind --version
rm -rf "bitcoin-${{ env.BITCOIND_VERSION }}" "bitcoin-${{ env.BITCOIND_VERSION }}-${{ env.BITCOIND_ARCH }}.tar.gz"
- name: Install llvm-tools-preview
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
toolchain: nightly-2024-07-27

- name: Install latest nextest release
uses: taiki-e/install-action@v2
with:
tool: nextest

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Set RUST_LOG
run: echo "RUST_LOG=${{ github.event.inputs.RUST_LOG }}" >> $GITHUB_ENV

- name: Run tests with coverage
run: |
cargo llvm-cov --workspace --locked nextest --profile ci --lcov --output-path lcov.info
Expand Down
110 changes: 106 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 26 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
[workspace]
members = [
"crates/btcio",
"crates/proof-impl/bitvm-bridge",
"crates/tx-graph",
"bridge-proofs",

# binaries listed separately

# test utilities
"crates/test-utils",
]

default-members = []

resolver = "2"

[workspace.dependencies]
# deps in this workspace
# imported from strata
strata-bridge-btcio = { path = "crates/btcio" }

# new crates
strata-bridge-tx-graph = { path = "crates/tx-graph" }
strata-proofimpl-bitvm-bridge = { path = "crates/proof-impl/bitvm-bridge" }

# deps from original strata repo
shrex = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0", features = [
"serde",
] }
strata-bridge-tx-builder = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-primitives = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-sp1-adapter = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-state = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-zkvm = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }

# transitive deps with patches for `bitvm`
ark-bn254 = { git = "/~https://github.com/Antalpha-Labs/algebra/", features = [
"curve",
], default-features = false }
ark-serialize = { version = "0.4.2", features = ["std"] }
ark-std = { version = "0.4.0", features = ["std"] }
strata-test-utils = { path = "crates/test-utils" }

# external deps
anyhow = "1.0.86"
Expand All @@ -53,7 +44,10 @@ bytes = "1.6.0"
chrono = "0.4.38"
digest = "0.10"
dotenvy = "0.15.7"
esplora-client = { git = "/~https://github.com/BitVM/rust-esplora-client" }
esplora-client = { git = "/~https://github.com/BitVM/rust-esplora-client", default-features = false, features = [
"blocking-https-rustls",
"async-https-rustls",
] }
ethnum = "1.5.0"
eyre = "0.6"
format_serde_error = { git = "/~https://github.com/AlexanderThaller/format_serde_error" }
Expand All @@ -73,6 +67,9 @@ musig2 = { version = "0.0.11", features = ["serde", "rand"] }
once_cell = "1.19.0"
openssh = { version = "0.10.4", features = ["native-mux"] }
openssh-sftp-client = { version = "0.14.6", features = ["openssh"] }
opentelemetry = "0.26"
opentelemetry-otlp = { version = "0.26", features = ["grpc-tonic"] }
opentelemetry_sdk = { version = "0.26", features = ["rt-tokio"] }
paste = "1.0.15"
rand = "0.8.5"
rand_chacha = { version = "0.3.1", default-features = false }
Expand All @@ -94,6 +91,15 @@ serde_json = { version = "1.0", default-features = false, features = [
] }
serde_with = "3.9.0"
sha2 = "0.10"
shrex = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0", features = [
"serde",
] }
strata-bridge-tx-builder = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-common = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-primitives = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-sp1-adapter = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-state = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
strata-zkvm = { git = "/~https://github.com/alpenlabs/strata.git", branch = "releases/0.1.0" }
suppaftp = { version = "6.0.1", features = ["async", "async-native-tls"] }
tempfile = "3.10.1"
terrors = "0.3.0"
Expand All @@ -102,6 +108,7 @@ threadpool = "1.8"
tokio = { version = "1.37", features = ["full"] }
toml = "0.5"
tracing = "0.1.40"
tracing-opentelemetry = "0.27"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }

# This is needed for custom build of SP1
Expand Down
Loading

0 comments on commit 453c694

Please sign in to comment.