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

chore: unify dependencies to root cargo.toml #5333

Merged
merged 12 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
1,808 changes: 833 additions & 975 deletions Cargo.lock

Large diffs are not rendered by default.

273 changes: 250 additions & 23 deletions Cargo.toml

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions api/bin/chainflip-broker-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ name = "chainflip-broker-api"
workspace = true

[dependencies]
chainflip-api = { path = "../../lib" }
cf-utilities = { package = "utilities", path = "../../../utilities" }
custom-rpc = { path = "../../../state-chain/custom-rpc" }
chainflip-api = { workspace = true }
cf-utilities = { workspace = true }
custom-rpc = { workspace = true }

anyhow = "1.0"
clap = { version = "4.5.3", features = ["derive"] }
futures = "0.3.30"
hex = "0.4.3"
jsonrpsee = { version = "0.23.2", features = ["full"] }
serde = { version = '1.0.197', features = ['derive'] }
sp-core = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
sp-rpc = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
tokio = "1.20.1"
tracing = "0.1.34"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] }
futures = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
sp-core = { workspace = true }
sp-rpc = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = 'chainflip-substrate-1.15.2+2' }
substrate-build-script-utils = { workspace = true }
30 changes: 15 additions & 15 deletions api/bin/chainflip-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ version = "1.7.0"
workspace = true

[dependencies]
anyhow = "1.0"
bigdecimal = "0.4.5"
clap = { version = "4.5.3", features = ["derive", "env"] }
config = "0.13.1"
futures = "0.3.30"
hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.197", features = ["derive", "rc"] }
tokio = { version = "1.13.1", features = ["full"] }
serde_json = "1.0"
anyhow = { workspace = true }
bigdecimal = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
config = { workspace = true }
futures = { workspace = true }
hex = { workspace = true, features = ["serde"] }
serde = { workspace = true, features = ["derive", "rc"] }
tokio = { workspace = true, features = ["full"] }
serde_json = { workspace = true }

# Local Deps
chainflip-engine = { path = "../../../engine/" }
chainflip-api = { path = "../../lib" }
cf-chains = { path = "../../../state-chain/chains" }
utilities = { path = "../../../utilities" }
custom-rpc = { path = "../../../state-chain/custom-rpc" }
chainflip-engine = { workspace = true }
chainflip-api = { workspace = true }
cf-chains = { workspace = true }
cf-utilities = { workspace = true }
custom-rpc = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = 'chainflip-substrate-1.15.2+2' }
substrate-build-script-utils = { workspace = true }
2 changes: 1 addition & 1 deletion api/bin/chainflip-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use api::{
};
use bigdecimal::BigDecimal;
use cf_chains::eth::Address as EthereumAddress;
use cf_utilities::{clean_hex_address, round_f64, task_scope::task_scope};
use chainflip_api::{
self as api,
primitives::{state_chain_runtime, FLIPPERINOS_PER_FLIP},
Expand All @@ -19,7 +20,6 @@ use clap::Parser;
use futures::FutureExt;
use serde::Serialize;
use std::{io::Write, path::PathBuf, sync::Arc};
use utilities::{clean_hex_address, round_f64, task_scope::task_scope};
mod settings;

#[tokio::main]
Expand Down
61 changes: 29 additions & 32 deletions api/bin/chainflip-ingress-egress-tracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,39 @@ edition = "2021"
workspace = true

[dependencies]
anyhow = "1.0"
async-trait = "0.1.73"
bitcoin = { version = "0.30.0", features = ["serde"] }
futures = "0.3.30"
hex = "0.4.3"
serde = "1.0.197"
serde_json = "1.0"
tokio = "1.29.1"
tracing = "0.1.34"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
tempfile = "3.8"
clap = { version = "4.5.3", features = ["derive", "env"] }
config = "0.13.1"
redis = { version = "0.27.2", features = ["tokio-comp"] }
anyhow = { workspace = true }
async-trait = { workspace = true }
bitcoin = { workspace = true, features = ["serde"] }
futures = { workspace = true }
hex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tempfile = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
config = { workspace = true }
redis = { workspace = true, features = ["tokio-comp"] }

sp-core = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
codec = { package = "parity-scale-codec", version = "3.6.12", features = [
"derive",
"full",
] }
sp-core = { workspace = true }
codec = { workspace = true, features = ["derive", "full"] }

# Local dependencies
chainflip-engine = { path = "../../../engine/" }
utilities = { path = "../../../utilities" }
cf-primitives = { path = "../../../state-chain/primitives" }
pallet-cf-environment = { path = "../../../state-chain/pallets/cf-environment" }
pallet-cf-ingress-egress = { path = "../../../state-chain/pallets/cf-ingress-egress" }
pallet-cf-broadcast = { path = "../../../state-chain/pallets/cf-broadcast" }
state-chain-runtime = { path = "../../../state-chain/runtime" }
cf-chains = { path = "../../../state-chain/chains" }
chainflip-engine = { workspace = true }
cf-utilities = { workspace = true }
cf-primitives = { workspace = true }
pallet-cf-environment = { workspace = true }
pallet-cf-ingress-egress = { workspace = true }
pallet-cf-broadcast = { workspace = true }
state-chain-runtime = { workspace = true }
cf-chains = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = 'chainflip-substrate-1.15.2+2' }
substrate-build-script-utils = { workspace = true }

[dev-dependencies]
frame-support = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
insta = { version = "1.36.1", features = ["json"] }
jsonrpsee = { version = "0.23.2", features = ["full"] }
mockall = "0.11.0"
frame-support = { workspace = true }
insta = { workspace = true, features = ["json"] }
jsonrpsee = { workspace = true, features = ["full"] }
mockall = { workspace = true }
2 changes: 1 addition & 1 deletion api/bin/chainflip-ingress-egress-tracker/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::store::RedisStore;
use cf_utilities::task_scope;
use chainflip_engine::settings::CfSettings;
use clap::Parser;
use futures::FutureExt;
use settings::{DepositTrackerSettings, TrackerOptions};
use utilities::task_scope;

mod settings;
mod store;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{settings::DepositTrackerSettings, store::RedisStore};
use anyhow::anyhow;
use cf_chains::dot::PolkadotHash;
use cf_primitives::{chains::assets::eth::Asset, NetworkEnvironment};
use cf_utilities::task_scope;
use chainflip_engine::{
state_chain_observer::{
self,
Expand All @@ -19,7 +20,6 @@ use chainflip_engine::{
};
use sp_core::H160;
use std::{collections::HashMap, ops::Deref};
use utilities::task_scope;

#[derive(Clone)]
pub(super) struct EnvironmentParameters {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use cf_primitives::EpochIndex;
use cf_utilities::task_scope::Scope;
use chainflip_engine::{
btc::retry_rpc::{BtcRetryRpcApi, BtcRetryRpcClient},
settings::NodeContainer,
Expand All @@ -14,7 +15,6 @@ use chainflip_engine::{
},
};
use futures::Future;
use utilities::task_scope::Scope;

use crate::DepositTrackerSettings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use cf_primitives::EpochIndex;
use cf_utilities::task_scope::Scope;
use chainflip_engine::{
dot::retry_rpc::DotRetryRpcClient,
settings::NodeContainer,
Expand All @@ -15,7 +16,6 @@ use chainflip_engine::{
},
};
use futures::Future;
use utilities::task_scope::Scope;

use crate::DepositTrackerSettings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::Context;
use cf_chains::{Chain, Ethereum};
use cf_primitives::chains::assets::eth::Asset;
use cf_utilities::task_scope;
use std::sync::Arc;
use utilities::task_scope;

use chainflip_engine::{
evm::{retry_rpc::EvmRetryRpcClient, rpc::EvmRpcClient},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ use cf_chains::{
AnyChain, Arbitrum, Bitcoin, Chain, Ethereum, Polkadot,
};
use cf_primitives::{BroadcastId, ForeignChain, NetworkEnvironment};
use cf_utilities::{rpc::NumberOrHex, ArrayCollect};
use chainflip_engine::state_chain_observer::client::{
chain_api::ChainApi, storage_api::StorageApi,
};
use pallet_cf_ingress_egress::DepositWitness;
use serde::{Serialize, Serializer};
use utilities::{rpc::NumberOrHex, ArrayCollect};

/// A wrapper type for bitcoin hashes that serializes the hash in reverse.
#[derive(Debug)]
Expand Down
40 changes: 20 additions & 20 deletions api/bin/chainflip-lp-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ name = "chainflip-lp-api"
workspace = true

[dependencies]
anyhow = "1.0"
clap = { version = "4.5.3", features = ["derive", "env"] }
futures = "0.3.30"
hex = "0.4.3"
jsonrpsee = { version = "0.23.2", features = ["full"] }
serde = { version = "1.0.197", features = ['derive'] }
serde_json = "1.0"
sp-rpc = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
sp-core = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
tokio = "1.20.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
pallet-cf-pools = { path = '../../../state-chain/pallets/cf-pools' }
cf-primitives = { path = "../../../state-chain/primitives" }
custom-rpc = { path = "../../../state-chain/custom-rpc" }
frame-system = { git = 'https://github.com/chainflip-io/polkadot-sdk.git', tag = 'chainflip-substrate-1.15.2+2' }
sc-rpc = { git = 'https://github.com/chainflip-io/polkadot-sdk.git', tag = 'chainflip-substrate-1.15.2+2' }
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
futures = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sp-rpc = { workspace = true }
sp-core = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
pallet-cf-pools = { workspace = true }
cf-primitives = { workspace = true }
custom-rpc = { workspace = true }
frame-system = { workspace = true }
sc-rpc = { workspace = true }

# Local
chainflip-api = { path = "../../lib" }
cf-utilities = { package = "utilities", path = "../../../utilities" }
chainflip-api = { workspace = true }
cf-utilities = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = 'chainflip-substrate-1.15.2+2' }
substrate-build-script-utils = { workspace = true }
82 changes: 41 additions & 41 deletions api/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,51 @@ edition = "2021"
workspace = true

[dependencies]
anyhow = "1.0"
async-trait = "0.1.49"
bs58 = "0.5.1"
ed25519-dalek = "2.1.1"
futures = "0.3.30"
hex = "0.4.3"
hmac-sha512 = "1.1.4"
libsecp256k1 = { version = '0.7' }
rand = "0.8.5"
serde = { version = "1.0.197", features = ["derive"] }
tiny-bip39 = "1.0.0"
tokio = "1.28"
tracing = "0.1"
zeroize = "1.5.4"
libp2p-identity = { version = "0.2", features = ["ed25519", "peerid"] }
lazy_static = "1.4"
jsonrpsee = { version = "0.23.2", features = ["full"] }
anyhow = { workspace = true }
async-trait = { workspace = true }
bs58 = { workspace = true }
ed25519-dalek = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
hmac-sha512 = { workspace = true }
libsecp256k1 = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tiny-bip39 = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
zeroize = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519", "peerid"] }
lazy_static = { workspace = true }
jsonrpsee = { workspace = true, features = ["full"] }

# Local
chainflip-engine = { path = "../../engine/" }
utilities = { path = "../../utilities/" }
chainflip-engine = { workspace = true }
cf-utilities = { workspace = true }

# State Chain
cf-amm = { path = "../../state-chain/amm" }
cf-chains = { path = "../../state-chain/chains" }
cf-primitives = { path = "../../state-chain/primitives" }
chainflip-node = { path = "../../state-chain/node" }
custom-rpc = { path = "../../state-chain/custom-rpc" }
pallet-cf-account-roles = { path = '../../state-chain/pallets/cf-account-roles' }
pallet-cf-environment = { path = "../../state-chain/pallets/cf-environment" }
pallet-cf-governance = { path = "../../state-chain/pallets/cf-governance" }
pallet-cf-ingress-egress = { path = "../../state-chain/pallets/cf-ingress-egress" }
pallet-cf-lp = { path = '../../state-chain/pallets/cf-lp' }
pallet-cf-asset-balances = { path = '../../state-chain/pallets/cf-asset-balances' }
pallet-cf-funding = { path = "../../state-chain/pallets/cf-funding" }
pallet-cf-swapping = { path = '../../state-chain/pallets/cf-swapping' }
pallet-cf-pools = { path = '../../state-chain/pallets/cf-pools' }
pallet-cf-threshold-signature = { path = "../../state-chain/pallets/cf-threshold-signature" }
pallet-cf-validator = { path = "../../state-chain/pallets/cf-validator" }
state-chain-runtime = { path = "../../state-chain/runtime" }
cf-amm = { workspace = true }
cf-chains = { workspace = true }
cf-primitives = { workspace = true }
chainflip-node = { workspace = true }
custom-rpc = { workspace = true }
pallet-cf-account-roles = { workspace = true }
pallet-cf-environment = { workspace = true }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, I think these should activate default features when it's in a std context (and to remain consistent with the previous dependency declaration).

The way it's done in the polkadot repo is:

pallet-xx.workspace = true
pallet-xx.default-fetaures = true

I think we should follow the same convention.

This is true in a few places, not just here. For example in the node, the engine, etc. Anywhere were we previously didn't explicitly set default-features = false we now need to override our workspace default and set default-features = true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.
I've added default-features = true for al the non- no-std crates, as well as dev-dependencies.

pallet-cf-governance = { workspace = true }
pallet-cf-ingress-egress = { workspace = true }
pallet-cf-lp = { workspace = true }
pallet-cf-asset-balances = { workspace = true }
pallet-cf-funding = { workspace = true }
pallet-cf-swapping = { workspace = true }
pallet-cf-pools = { workspace = true }
pallet-cf-threshold-signature = { workspace = true }
pallet-cf-validator = { workspace = true }
state-chain-runtime = { workspace = true }


# Substrate
frame-support = { git = "https://github.com/chainflip-io/polkadot-sdk.git", tag = "chainflip-substrate-1.15.2+2" }
sp-consensus-aura = { git = 'https://github.com/chainflip-io/polkadot-sdk.git', tag = 'chainflip-substrate-1.15.2+2' }
sp-core = { git = 'https://github.com/chainflip-io/polkadot-sdk.git', tag = 'chainflip-substrate-1.15.2+2' }
sp-consensus-grandpa = { git = 'https://github.com/chainflip-io/polkadot-sdk.git', tag = 'chainflip-substrate-1.15.2+2' }
codec = { package = "parity-scale-codec", version = "3.6.12" }
frame-support = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true }
sp-consensus-grandpa = { workspace = true }
codec = { workspace = true }
2 changes: 1 addition & 1 deletion api/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ pub mod queries;

pub use chainflip_node::chain_spec::use_chainflip_account_id_encoding;

use cf_utilities::{clean_hex_address, rpc::NumberOrHex, task_scope::Scope};
use chainflip_engine::state_chain_observer::client::{
base_rpc_api::BaseRpcClient, extrinsic_api::signed::UntilInBlock, DefaultRpcClient,
StateChainClient,
};
use utilities::{clean_hex_address, rpc::NumberOrHex, task_scope::Scope};

lazy_static::lazy_static! {
static ref API_VERSION: SemVer = SemVer {
Expand Down
Loading