Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bitcoin transaction fee assessment #557

Merged
merged 15 commits into from
Sep 24, 2024
Merged
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ base64 = "0.22.1"
bincode = "1.3.3"
bitcoin = { version = "0.32", features = ["serde"] }
bitcoincore-rpc = { version = "0.19" }
bitcoincore-rpc-json = { version = "0.19" }
bitvec = { version = "1.0", default-features = false, features = ["serde"] }
clarity = { git = "https://github.com/stacks-network/stacks-core", rev = "cbf0c52fb7a0b8ac55badadcf3773ca0848a25cf" }
clap = { version = "4.5.4", features = ["derive", "env"] }
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ integration-env-up: $(INSTALL_TARGET) $(AUTOGENERATED_BLOCKLIST_CLIENT_CLIENT)
docker compose --file docker-compose.test.yml up --detach

integration-test: $(INSTALL_TARGET) $(AUTOGENERATED_BLOCKLIST_CLIENT_CLIENT)
cargo test --package signer --test integration --all-features -- --test-threads=1
cargo test --package sbtc --package signer --test integration --all-features -- --test-threads=1

integration-env-down: $(INSTALL_TARGET) $(AUTOGENERATED_BLOCKLIST_CLIENT_CLIENT)
docker compose --file docker-compose.test.yml down
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:

bitcoind:
container_name: bitcoind
image: lncm/bitcoind:v27.0
image: lncm/bitcoind:v25.0
cylewitruk marked this conversation as resolved.
Show resolved Hide resolved
volumes:
- ./signer/tests/service-configs/bitcoin.conf:/data/.bitcoin/bitcoin.conf:ro
restart: on-failure
Expand Down
1 change: 1 addition & 0 deletions sbtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ testing = []
[dependencies]
bitcoin = { workspace = true, features = ["rand-std"] }
bitcoincore-rpc.workspace = true
bitcoincore-rpc-json.workspace = true
clarity.workspace = true
rand.workspace = true
serde.workspace = true
Expand Down
1 change: 0 additions & 1 deletion sbtc/src/deposits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ mod tests {
block_hash: None,
confirmations: None,
block_time: None,
in_active_chain: None,
})
}
}
Expand Down
9 changes: 6 additions & 3 deletions sbtc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pub enum Error {
/// Error when using a BitcoinClient trait function
#[error("could not execute bitcoin client RPC call {0}")]
BitcoinClient(#[source] Box<dyn std::error::Error + Sync + Send + 'static>),
// /// Error when creating an RPC client to bitcoin-core
// #[error("could not create RPC client to {1}: {0}")]
// BitcoinCoreRpcClient(#[source] bitcoincore_rpc::Error, String),
/// Error when creating an RPC client to bitcoin-core
#[error("could not create RPC client to {1}: {0}")]
BitcoinCoreRpcClient(#[source] bitcoincore_rpc::Error, String),
/// Returned when we could not decode the hex into a
/// bitcoin::Transaction.
#[error("failed to decode the provided hex into a transaction. txid: {1}. {0}")]
Expand Down Expand Up @@ -54,6 +54,9 @@ pub enum Error {
/// The reclaim script was invalid.
#[error("the reclaim script format was invalid")]
InvalidReclaimScript,
/// This should never happen.
#[error("could not serialize the type into JSON")]
JsonSerialize(#[source] serde_json::Error),
/// Failed to convert response into an Amount, which is unsigned and
/// bounded.
#[error("Could not convert float {1} into bitcoin::Amount: {0}")]
Expand Down
Loading
Loading