Skip to content

Commit

Permalink
Flatten back the structure (paritytech#837)
Browse files Browse the repository at this point in the history
* Remove chains.

* Move relay clients.

* Flatten generic.

* Fix fmt.
  • Loading branch information
tomusdrw authored and serban300 committed Apr 10, 2024
1 parent 2aee529 commit 48bcca5
Show file tree
Hide file tree
Showing 109 changed files with 87 additions and 86 deletions.
2 changes: 1 addition & 1 deletion bridges/bin/millau/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ structopt = "0.3.21"
# Bridge dependencies

bp-messages = { path = "../../../primitives/messages" }
bp-millau= { path = "../../../primitives/chains/millau" }
bp-millau= { path = "../../../primitives/chain-millau" }
bp-runtime = { path = "../../../primitives/runtime" }
millau-runtime = { path = "../runtime" }
pallet-bridge-messages = { path = "../../../modules/messages" }
Expand Down
8 changes: 4 additions & 4 deletions bridges/bin/millau/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ serde = { version = "1.0.124", optional = true, features = ["derive"] }

bp-header-chain = { path = "../../../primitives/header-chain", default-features = false }
bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chains/millau", default-features = false }
bp-rialto = { path = "../../../primitives/chains/rialto", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false }
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
bp-westend = { path = "../../../primitives/chains/westend", default-features = false }
bp-westend = { path = "../../../primitives/chain-westend", default-features = false }
bridge-runtime-common = { path = "../../runtime-common", default-features = false }
pallet-bridge-call-dispatch = { path = "../../../modules/call-dispatch", default-features = false }
pallet-finality-verifier = { path = "../../../modules/finality-verifier", default-features = false }
pallet-bridge-messages = { path = "../../../modules/messages", default-features = false }
pallet-finality-verifier = { path = "../../../modules/finality-verifier", default-features = false }
pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false }
pallet-substrate-bridge = { path = "../../../modules/substrate", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion bridges/bin/rialto/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ structopt = "0.3.21"

bp-messages = { path = "../../../primitives/messages" }
bp-runtime = { path = "../../../primitives/runtime" }
bp-rialto = { path = "../../../primitives/chains/rialto" }
bp-rialto = { path = "../../../primitives/chain-rialto" }
pallet-bridge-messages = { path = "../../../modules/messages" }
pallet-bridge-messages-rpc = { path = "../../../modules/messages/rpc" }
rialto-runtime = { path = "../runtime" }
Expand Down
4 changes: 2 additions & 2 deletions bridges/bin/rialto/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ bp-eth-poa = { path = "../../../primitives/ethereum-poa", default-features = fal
bp-header-chain = { path = "../../../primitives/header-chain", default-features = false }
bp-message-dispatch = { path = "../../../primitives/message-dispatch", default-features = false }
bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chains/millau", default-features = false }
bp-rialto = { path = "../../../primitives/chains/rialto", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false }
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
bridge-runtime-common = { path = "../../runtime-common", default-features = false }
pallet-bridge-eth-poa = { path = "../../../modules/ethereum", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] }
# Bridge dependencies

bp-messages = { path = "../../primitives/messages", default-features = false }
bp-rialto = { path = "../../primitives/chains/rialto", default-features = false }
bp-rialto = { path = "../../primitives/chain-rialto", default-features = false }
bp-runtime = { path = "../../primitives/runtime", default-features = false }

# Substrate Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]

# Bridge Dependencies
bp-messages = { path = "../../messages", default-features = false }
bp-polkadot-core = { path = "../../polkadot-core", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-polkadot-core = { path = "../polkadot-core", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }

# Substrate Based Dependencies
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

# Bridge Dependencies

bp-messages = { path = "../../messages", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }
fixed-hash = { version = "0.7.0", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-codec = { version = "0.5.0", default-features = false }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]

# Bridge Dependencies
bp-messages = { path = "../../messages", default-features = false }
bp-polkadot-core = { path = "../../polkadot-core", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-polkadot-core = { path = "../polkadot-core", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }

# Substrate Based Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

# Bridge Dependencies

bp-messages = { path = "../../messages", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }

# Substrate Based Dependencies

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]

# Bridge Dependencies
bp-messages = { path = "../../messages", default-features = false }
bp-polkadot-core = { path = "../../polkadot-core", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-polkadot-core = { path = "../polkadot-core", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }

# Substrate Based Dependencies
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// Runtime-generated DecodeLimit::decode_all_with_depth_limit
#![allow(clippy::unnecessary_mut_passed)]

use bp_messages::{LaneId, Weight, MessageNonce, UnrewardedRelayersState};
use bp_messages::{LaneId, MessageNonce, UnrewardedRelayersState, Weight};
use sp_std::prelude::*;

pub use bp_polkadot_core::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]

# Bridge Dependencies
bp-messages = { path = "../../messages", default-features = false }
bp-polkadot-core = { path = "../../polkadot-core", default-features = false }
bp-runtime = { path = "../../runtime", default-features = false }
bp-messages = { path = "../messages", default-features = false }
bp-polkadot-core = { path = "../polkadot-core", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }

# Substrate Based Dependencies
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ time = "0.2"

bp-currency-exchange = { path = "../../primitives/currency-exchange" }
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
exchange-relay = { path = "../generic/exchange" }
headers-relay = { path = "../generic/headers" }
messages-relay = { path = "../generic/messages" }
relay-ethereum-client = { path = "../clients/ethereum" }
relay-rialto-client = { path = "../clients/rialto" }
relay-substrate-client = { path = "../clients/substrate" }
relay-utils = { path = "../generic/utils" }
exchange-relay = { path = "../exchange" }
headers-relay = { path = "../headers" }
messages-relay = { path = "../messages" }
relay-ethereum-client = { path = "../client-ethereum" }
relay-rialto-client = { path = "../client-rialto" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
rialto-runtime = { path = "../../bin/rialto/runtime" }

# Substrate Dependencies
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ structopt = "0.3"
# Bridge dependencies

bp-header-chain = { path = "../../primitives/header-chain" }
bp-kusama = { path = "../../primitives/chains/kusama" }
bp-kusama = { path = "../../primitives/chain-kusama" }
bp-messages = { path = "../../primitives/messages" }
bp-millau = { path = "../../primitives/chains/millau" }
bp-polkadot = { path = "../../primitives/chains/polkadot" }
bp-millau = { path = "../../primitives/chain-millau" }
bp-polkadot = { path = "../../primitives/chain-polkadot" }
bp-rialto = { path = "../../primitives/chain-rialto" }
bp-runtime = { path = "../../primitives/runtime" }
bp-rialto = { path = "../../primitives/chains/rialto" }
bp-westend = { path = "../../primitives/chains/westend" }
bp-westend = { path = "../../primitives/chain-westend" }
bridge-runtime-common = { path = "../../bin/runtime-common" }
finality-grandpa = { version = "0.14.0" }
finality-relay = { path = "../generic/finality" }
headers-relay = { path = "../generic/headers" }
messages-relay = { path = "../generic/messages" }
finality-relay = { path = "../finality" }
headers-relay = { path = "../headers" }
messages-relay = { path = "../messages" }
millau-runtime = { path = "../../bin/millau/runtime" }
pallet-bridge-call-dispatch = { path = "../../modules/call-dispatch" }
pallet-finality-verifier = { path = "../../modules/finality-verifier" }
pallet-bridge-messages = { path = "../../modules/messages" }
relay-kusama-client = { path = "../clients/kusama" }
relay-millau-client = { path = "../clients/millau" }
relay-polkadot-client = { path = "../clients/polkadot" }
relay-rialto-client = { path = "../clients/rialto" }
relay-substrate-client = { path = "../clients/substrate" }
relay-westend-client = { path = "../clients/westend" }
relay-utils = { path = "../generic/utils" }
pallet-finality-verifier = { path = "../../modules/finality-verifier" }
relay-kusama-client = { path = "../client-kusama" }
relay-millau-client = { path = "../client-millau" }
relay-polkadot-client = { path = "../client-polkadot" }
relay-rialto-client = { path = "../client-rialto" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
relay-westend-client = { path = "../client-westend" }
rialto-runtime = { path = "../../bin/rialto/runtime" }

# Substrate Dependencies
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
bp-eth-poa = { path = "../../../primitives/ethereum-poa" }
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
headers-relay = { path = "../headers" }
hex-literal = "0.3"
jsonrpsee-proc-macros = "0.2.0-alpha.2"
jsonrpsee-types = "0.2.0-alpha.2"
jsonrpsee-ws-client = "0.2.0-alpha.2"
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
log = "0.4.11"
relay-utils = { path = "../../generic/utils" }
relay-utils = { path = "../utils" }
web3 = { version = "0.15", git = "https://github.com/tomusdrw/rust-web3", branch ="td-ethabi", default-features = false }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }
headers-relay = { path = "../headers" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }

# Bridge dependencies

bp-kusama = { path = "../../../primitives/chains/kusama" }
bp-kusama = { path = "../../primitives/chain-kusama" }

# Substrate Dependencies

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../../clients/substrate" }
relay-utils = { path = "../../generic/utils" }
headers-relay = { path = "../headers" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }

# Supported Chains

millau-runtime = { path = "../../../bin/millau/runtime" }
millau-runtime = { path = "../../bin/millau/runtime" }

# Substrate Dependencies

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }
headers-relay = { path = "../headers" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }

# Bridge dependencies

bp-polkadot = { path = "../../../primitives/chains/polkadot" }
bp-polkadot = { path = "../../primitives/chain-polkadot" }

# Substrate Dependencies

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }
headers-relay = { path = "../headers" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }

# Bridge dependencies

rialto-runtime = { path = "../../../bin/rialto/runtime" }
rialto-runtime = { path = "../../bin/rialto/runtime" }

# Substrate Dependencies

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ rand = "0.7"

# Bridge dependencies

bp-header-chain = { path = "../../../primitives/header-chain" }
bp-messages = { path = "../../../primitives/messages" }
bp-runtime = { path = "../../../primitives/runtime" }
finality-relay = { path = "../../generic/finality" }
headers-relay = { path = "../../generic/headers" }
relay-utils = { path = "../../generic/utils" }
bp-header-chain = { path = "../../primitives/header-chain" }
bp-messages = { path = "../../primitives/messages" }
bp-runtime = { path = "../../primitives/runtime" }
finality-relay = { path = "../finality" }
headers-relay = { path = "../headers" }
relay-utils = { path = "../utils" }

# Substrate Dependencies

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }
headers-relay = { path = "../headers" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }

# Bridge dependencies

bp-westend = { path = "../../../primitives/chains/westend" }
bp-westend = { path = "../../primitives/chain-westend" }

# Substrate Dependencies

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@ mod tests {
}
}));

run(
async_std::task::block_on(run(
storage,
source,
target,
None,
exit_receiver.into_future().map(|(_, _)| ()),
);
));
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ fn run_sync_loop(state_function: impl Fn(&mut ClientsData) -> bool + Send + Sync
stall_timeout: Duration::from_secs(1),
};

run(
async_std::task::block_on(run(
source_client,
target_client,
sync_params,
None,
exit_receiver.into_future().map(|(_, _)| ()),
);
));

let clients_data = clients_data.lock().clone();
clients_data
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ fn run_sync_loop_test(params: SyncLoopTestParams) {
target.data.lock().requires_extra = target_requires_extra;
target.data.lock().requires_completion = target_requires_completion;

run(
async_std::task::block_on(run(
source,
test_tick(),
target,
Expand All @@ -502,7 +502,7 @@ fn run_sync_loop_test(params: SyncLoopTestParams) {
crate::sync::tests::default_sync_params(),
None,
exit_receiver.into_future().map(|(_, _)| ()),
);
));
}

#[test]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ parking_lot = "0.11.0"

# Bridge Dependencies

bp-messages = { path = "../../../primitives/messages" }
bp-messages = { path = "../../primitives/messages" }
relay-utils = { path = "../utils" }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ pub(crate) mod tests {
target_client,
None,
exit_signal,
);
)
.await;
let result = data.lock().clone();
result
})
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 48bcca5

Please sign in to comment.