Skip to content

Commit

Permalink
Merge pull request fedimint#5797 from tvolk131/workspace_deps_cleanup
Browse files Browse the repository at this point in the history
chore: cleanup workspace deps
  • Loading branch information
elsirion authored Aug 13, 2024
2 parents 04ddaf3 + dd517c2 commit c532559
Show file tree
Hide file tree
Showing 42 changed files with 115 additions and 118 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

19 changes: 12 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,25 @@ license-file = "LICENSE"
keywords = ["bitcoin", "lightning", "chaumian", "e-cash", "federated"]

[workspace.dependencies]
aquamarine = "0.5.0"
async-stream = "0.3.5"
base64 = "0.22.1"
criterion = { version = "0.5.1" }
criterion = "0.5.1"
threshold_crypto = { version = "0.2.1", package = "fedimint-threshold-crypto" }
tokio-stream = "0.1.15"
tonic_lnd = { version = "0.2.0", package = "fedimint-tonic-lnd", features = [
"lightningrpc",
"routerrpc",
] }
cln-rpc = "0.1.9"
clap = { version = "4.5.15", features = [
"derive",
"std",
"help",
"usage",
"env",
"error-context",
"help",
"std",
"suggestions",
"env",
"usage",
], default-features = false }
electrum-client = { version = "0.18.0", features = ["use-rustls"] }
esplora-client = { version = "0.6.0", default-features = false, features = [
Expand All @@ -119,13 +122,14 @@ bls12_381 = "0.8.0"
group = "0.13.0"
itertools = "0.13.0"
anyhow = "1.0.86"
hyper = { version = "1.4" }
hyper = "1.4"
bitcoin_hashes = "0.12.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
tracing = "0.1.40"
bitcoin = "0.30.2"
bitcoincore-rpc = "0.17.0"
miniscript = "10.0.0"
semver = "1.0.23"
strum = "0.26"
strum_macros = "0.26"
Expand All @@ -135,7 +139,8 @@ futures-util = "0.3.30"
lightning = "0.0.123"
lightning-invoice = "0.31.0"
thiserror = "1.0.63"
tokio = { version = "1.39.2", features = ["sync", "io-util"] }
tokio = "1.39.2"
tracing-subscriber = "0.3.18"
url = "2.5.2"
erased-serde = "0.4"
async-trait = "0.1.81"
Expand Down
16 changes: 4 additions & 12 deletions devimint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@ path = "src/main.rs"
anyhow = { version = "1.0.86", features = ["backtrace"] }
axum = { version = "0.7.5", features = ["tracing"] }
bitcoincore-rpc = { workspace = true }
clap = { version = "4.5.15", features = [
"derive",
"env",
"std",
"help",
"usage",
"error-context",
"suggestions",
], default-features = false }
clap = { workspace = true }
cln-rpc = { workspace = true }
esplora-client = { workspace = true }
fedimint-aead = { path = "../crypto/aead" }
fedimint-api-client = { workspace = true }
fedimint-bitcoind = { path = "../fedimint-bitcoind" }
fedimint-client = { path = "../fedimint-client" }
fedimint-client = { workspace = true }
fedimint-core = { workspace = true }
fedimint-ln-client = { workspace = true, features = ["cli"] }
fedimint-ln-server = { path = "../modules/fedimint-ln-server" }
Expand Down Expand Up @@ -55,11 +47,11 @@ rand = { workspace = true }
semver = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { version = "1.39.2", features = ["full", "tracing"] }
tokio = { workspace = true, features = ["full", "tracing"] }
tonic_lnd = { workspace = true }
tower-http = { version = "0.5.2", features = ["cors", "auth"] }
tracing = { workspace = true }
tracing-subscriber = "0.3.18"
tracing-subscriber = { workspace = true }
url = { workspace = true }

[build-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions fedimint-api-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ lru = "0.12.4"
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1.39.2", features = ["sync", "io-util"] }
tokio = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
tokio-test = "0.4.4"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-subscriber = { workspace = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
jsonrpsee-ws-client = { version = "0.24.2", features = [
"tls",
], default-features = false }
tokio = { version = "1.39.2", features = ["full", "tracing"] }
tokio = { workspace = true, features = ["full", "tracing"] }
tokio-rustls = { version = "0.26.0", default-features = false, features = [
"logging",
"tls12",
Expand All @@ -50,7 +50,7 @@ webpki-roots = { version = "0.26.3" }
rustls-pki-types = { version = "1.8.0" }

[target.'cfg(target_family = "wasm")'.dependencies]
jsonrpsee-wasm-client = { version = "0.24.2" }
jsonrpsee-wasm-client = "0.24.2"
async-lock = "3.4"
# getrandom is transitive dependency of rand
# on wasm, we need to enable the js backend
Expand Down
4 changes: 2 additions & 2 deletions fedimint-bitcoind/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ path = "src/lib.rs"
anyhow = { workspace = true }
async-trait = { workspace = true }
bitcoin = { workspace = true }
bitcoincore-rpc = { version = "0.17.0", optional = true }
bitcoincore-rpc = { workspace = true, optional = true }
electrum-client = { workspace = true, optional = true }
esplora-client = { workspace = true, optional = true }
fedimint-core = { version = "=0.5.0-alpha", path = "../fedimint-core" }
fedimint-logging = { workspace = true }
hex = "0.4.3"
hex = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions fedimint-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ path = "src/lib.rs"
[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
base64 = "0.22.1"
base64 = { workspace = true }
bip39 = { version = "2.0.0", features = ["rand"] }
bitcoin = { workspace = true }
clap = { workspace = true }
Expand Down Expand Up @@ -53,9 +53,9 @@ serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
time = { version = "0.3.36", features = ["formatting"] }
tokio = { version = "1.39.2", features = ["full", "tracing"] }
tokio = { workspace = true, features = ["full", "tracing"] }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-subscriber = { workspace = true }
url = { version = "2.5.2", features = ["serde"] }

[build-dependencies]
Expand Down
9 changes: 4 additions & 5 deletions fedimint-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ path = "src/lib.rs"

[dependencies]
anyhow = { workspace = true }
aquamarine = "0.5.0"
async-stream = "0.3.5"
aquamarine = { workspace = true }
async-stream = { workspace = true }
async-trait = { workspace = true }
bitcoin = { workspace = true }
fedimint-aead = { version = "=0.5.0-alpha", path = "../crypto/aead" }
Expand All @@ -34,14 +34,13 @@ futures = { workspace = true }
itertools = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
secp256k1-zkp = "0.9.2"
serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1.39.2", features = [ "time", "macros", "rt" ] }
tokio-stream = { version = "0.1.15", features = [ "time", "sync" ] }
tokio = { workspace = true, features = [ "time", "macros", "rt" ] }
tokio-stream = { workspace = true, features = [ "sync" ] }
tracing = { workspace = true }

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions fedimint-client/src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::collections::{BTreeMap, BTreeSet};
use std::io::{Cursor, Error, Read, Write};

use anyhow::{bail, Context, Result};
use bitcoin::secp256k1::{KeyPair, PublicKey, Secp256k1, SignOnly};
use fedimint_api_client::api::DynGlobalApi;
use fedimint_core::core::backup::{
BackupRequest, SignedBackupRequest, BACKUP_REQUEST_MAX_PAYLOAD_SIZE_BYTES,
Expand All @@ -13,7 +14,6 @@ use fedimint_core::encoding::{Decodable, DecodeError, Encodable};
use fedimint_core::module::registry::ModuleDecoderRegistry;
use fedimint_derive_secret::DerivableSecret;
use fedimint_logging::{LOG_CLIENT, LOG_CLIENT_BACKUP, LOG_CLIENT_RECOVERY};
use secp256k1_zkp::{KeyPair, Secp256k1};
use serde::{Deserialize, Serialize};
use tracing::{debug, info, warn};

Expand Down Expand Up @@ -368,11 +368,11 @@ impl Client {

/// Backup id derived from the root secret key (public key used to self-sign
/// backup requests)
pub fn get_backup_id(&self) -> bitcoin::secp256k1::PublicKey {
pub fn get_backup_id(&self) -> PublicKey {
self.get_derived_backup_signing_key().public_key()
}

pub fn get_backup_id_static(root_secret: &DerivableSecret) -> bitcoin::secp256k1::PublicKey {
pub fn get_backup_id_static(root_secret: &DerivableSecret) -> PublicKey {
Self::get_derived_backup_signing_key_static(root_secret).public_key()
}
/// Static version of [`Self::get_derived_backup_encryption_key`] for
Expand All @@ -388,7 +388,7 @@ impl Client {
fn get_derived_backup_signing_key_static(secret: &DerivableSecret) -> KeyPair {
secret
.derive_backup_secret()
.to_secp_key(&Secp256k1::<secp256k1_zkp::SignOnly>::gen_new())
.to_secp_key(&Secp256k1::<SignOnly>::gen_new())
}

fn get_derived_backup_encryption_key(&self) -> fedimint_aead::LessSafeKey {
Expand Down
7 changes: 4 additions & 3 deletions fedimint-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ use std::time::Duration;
use anyhow::{anyhow, bail, ensure, Context};
use async_stream::{stream, try_stream};
use backup::ClientBackup;
use bitcoin::secp256k1;
use db::{
apply_migrations_client, apply_migrations_core_client, get_core_client_database_migrations,
ApiSecretKey, CachedApiVersionSet, CachedApiVersionSetKey, ClientConfigKey, ClientInitStateKey,
Expand Down Expand Up @@ -134,7 +135,7 @@ use meta::{LegacyMetaSource, MetaService};
use module::recovery::RecoveryProgress;
use module::{DynClientModule, FinalClient};
use rand::thread_rng;
use secp256k1_zkp::{PublicKey, Secp256k1};
use secp256k1::{PublicKey, Secp256k1};
use secret::{DeriveableSecretClientExt, PlainRootSecretStrategy, RootSecretStrategy as _};
use serde::Deserialize;
use thiserror::Error;
Expand Down Expand Up @@ -774,7 +775,7 @@ pub struct Client {
api: DynGlobalApi,
root_secret: DerivableSecret,
operation_log: OperationLog,
secp_ctx: Secp256k1<secp256k1_zkp::All>,
secp_ctx: Secp256k1<secp256k1::All>,
meta_service: Arc<MetaService>,

task_group: TaskGroup,
Expand Down Expand Up @@ -1887,7 +1888,7 @@ impl Client {
/// once this function is guaranteed to return immediately.
pub async fn get_guardian_public_keys_blocking(
&self,
) -> BTreeMap<PeerId, secp256k1_zkp::PublicKey> {
) -> BTreeMap<PeerId, secp256k1::PublicKey> {
self.db.autocommit(|dbtx, _| Box::pin(async move {
let config = self.config().await;

Expand Down
2 changes: 1 addition & 1 deletion fedimint-client/src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::sync::Arc;
use std::{ffi, marker, ops};

use anyhow::{anyhow, bail};
use bitcoin::secp256k1::PublicKey;
use fedimint_api_client::api::DynGlobalApi;
use fedimint_core::config::ClientConfig;
use fedimint_core::core::{
Expand All @@ -22,7 +23,6 @@ use fedimint_core::{
apply, async_trait_maybe_send, dyn_newtype_define, maybe_add_send_sync, Amount, OutPoint,
TransactionId,
};
use secp256k1_zkp::PublicKey;

use self::init::ClientModuleInit;
use crate::module::recovery::{DynModuleBackup, ModuleBackup};
Expand Down
7 changes: 4 additions & 3 deletions fedimint-client/src/transaction/builder.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use std::sync::Arc;

use bitcoin::key::KeyPair;
use bitcoin::secp256k1;
use fedimint_core::core::{DynInput, DynOutput, IntoDynInstance, ModuleInstanceId};
use fedimint_core::transaction::{Transaction, TransactionSignature};
use fedimint_core::Amount;
use itertools::multiunzip;
use rand::{CryptoRng, Rng, RngCore};
use secp256k1_zkp::Secp256k1;
use secp256k1::Secp256k1;

use crate::module::StateGenerator;
use crate::sm::DynState;
Expand Down Expand Up @@ -102,7 +103,7 @@ impl TransactionBuilder {
mut rng: R,
) -> (Transaction, Vec<DynState>)
where
C: secp256k1_zkp::Signing + secp256k1_zkp::Verification,
C: secp256k1::Signing + secp256k1::Verification,
{
let (inputs, input_keys, input_states): (Vec<_>, Vec<_>, Vec<_>) = multiunzip(
self.inputs
Expand All @@ -118,7 +119,7 @@ impl TransactionBuilder {
let nonce: [u8; 8] = rng.gen();

let txid = Transaction::tx_hash_from_parts(&inputs, &outputs, nonce);
let msg = secp256k1_zkp::Message::from_slice(&txid[..]).expect("txid has right length");
let msg = secp256k1::Message::from_slice(&txid[..]).expect("txid has right length");

let signatures = input_keys
.into_iter()
Expand Down
8 changes: 4 additions & 4 deletions fedimint-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jsonrpsee-core = { version = "0.24.2", features = ["client"] }
lightning = { workspace = true }
lightning-invoice = { workspace = true }
macro_rules_attribute = "0.2.0"
miniscript = { version = "10.0.0", features = ["compiler", "serde"] }
miniscript = { workspace = true, features = ["serde"] }
parity-scale-codec = { version = "3.6.12", features = ["derive"] }
rand = { workspace = true }
secp256k1 = { version = "0.27.0", features = ["global-context", "rand-std"] }
Expand All @@ -61,16 +61,16 @@ url = { version = "2.5.2", features = ["serde"] }
[dev-dependencies]
test-log = { version = "0.2", features = ["trace"], default-features = false }
tokio-test = "0.4.4"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-subscriber = { workspace = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
tokio = { version = "1.39.2", features = ["full", "tracing"] }
tokio = { workspace = true, features = ["full", "tracing"] }
tokio-rustls = { workspace = true }

[target.'cfg(target_family = "wasm")'.dependencies]
jsonrpsee-wasm-client = "0.24.2"
async-lock = "3.4"
tokio = "1.39.2"
tokio = { workspace = true, features = ["io-util"] }
futures-util = { workspace = true }
# getrandom is transitive dependency of rand
# on wasm, we need to enable the js backend
Expand Down
2 changes: 1 addition & 1 deletion fedimint-dbtool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
tokio = "1.39.2"
tokio = { workspace = true }
tracing = { workspace = true }

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions fedimint-load-test-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ path = "src/main.rs"

[dependencies]
anyhow = { workspace = true }
base64 = "0.22.1"
base64 = { workspace = true }
bitcoin = { workspace = true }
clap = { workspace = true }
devimint = { version = "=0.5.0-alpha", path = "../devimint" }
Expand All @@ -33,7 +33,7 @@ lightning-invoice = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { version = "1", features = ["full", "tracing"] }
tokio = { workspace = true, features = ["full", "tracing"] }
tracing = { workspace = true }
url = { version = "2.5.2", features = ["serde"] }

Expand Down
2 changes: 1 addition & 1 deletion fedimint-logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ console-subscriber = { version = "0.4.0", optional = true }
opentelemetry = { version = "0.24.0", optional = true }
opentelemetry-jaeger = { version = "0.22.0", optional = true }
tracing-opentelemetry = { version = "0.24.0", optional = true }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
2 changes: 1 addition & 1 deletion fedimint-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ anyhow = { version = "1.0.86", features = ["backtrace"] }
axum = "0.7.5"
fedimint-core = { workspace = true }
prometheus = "0.13.4"
tokio = "1"
tokio = { workspace = true }
tracing = { workspace = true }
Loading

0 comments on commit c532559

Please sign in to comment.