Skip to content

Commit

Permalink
Reorganize relay code to make it easy to add new networks. (paritytec…
Browse files Browse the repository at this point in the history
…h#813)

* Nest some crates.

* Alter command execution to make it easier to add new bridges.

* Rename sub-dirs.

* cargo fmt --all

* Address clippy.

* Update relays/substrate/src/rialto_millau/cli.rs

Co-authored-by: Hernando Castano <[email protected]>

Co-authored-by: Hernando Castano <[email protected]>
  • Loading branch information
2 people authored and serban300 committed Apr 9, 2024
1 parent f6c59dd commit a644b85
Show file tree
Hide file tree
Showing 66 changed files with 1,548 additions and 1,283 deletions.
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 = "../headers-relay" }
headers-relay = { path = "../../generic/headers" }
hex-literal = "0.3"
jsonrpsee-proc-macros = "0.2.0-alpha"
jsonrpsee-types = "0.2.0-alpha"
jsonrpsee-ws-client = "0.2.0-alpha"
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
log = "0.4.11"
relay-utils = { path = "../utils" }
relay-utils = { path = "../../generic/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 = "../headers-relay" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }

# Bridge dependencies

bp-kusama = { path = "../../primitives/chains/kusama" }
bp-kusama = { path = "../../../primitives/chains/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 = "../headers-relay" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../../clients/substrate" }
relay-utils = { path = "../../generic/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 = "../headers-relay" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/utils" }

# Bridge dependencies

bp-polkadot = { path = "../../primitives/chains/polkadot" }
bp-polkadot = { path = "../../../primitives/chains/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 = "../headers-relay" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
headers-relay = { path = "../../generic/headers" }
relay-substrate-client = { path = "../substrate" }
relay-utils = { path = "../../generic/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-message-lane = { path = "../../primitives/message-lane" }
bp-runtime = { path = "../../primitives/runtime" }
finality-relay = { path = "../finality-relay" }
headers-relay = { path = "../headers-relay" }
relay-utils = { path = "../utils" }
bp-header-chain = { path = "../../../primitives/header-chain" }
bp-message-lane = { path = "../../../primitives/message-lane" }
bp-runtime = { path = "../../../primitives/runtime" }
finality-relay = { path = "../../generic/finality" }
headers-relay = { path = "../../generic/headers" }
relay-utils = { path = "../../generic/utils" }

# Substrate Dependencies

Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions bridges/relays/ethereum/Cargo.toml
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 = "../exchange-relay" }
headers-relay = { path = "../headers-relay" }
messages-relay = { path = "../messages-relay" }
relay-ethereum-client = { path = "../ethereum-client" }
relay-rialto-client = { path = "../rialto-client" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
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" }
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 @@ -11,7 +11,7 @@ async-std = "1.6.5"
async-trait = "0.1.40"
backoff = "0.2"
futures = "0.3.5"
headers-relay = { path = "../headers-relay" }
headers-relay = { path = "../headers" }
log = "0.4.11"
num-traits = "0.2"
relay-utils = { path = "../utils" }
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 @@ -15,5 +15,5 @@ parking_lot = "0.11.0"

# Bridge Dependencies

bp-message-lane = { path = "../../primitives/message-lane" }
bp-message-lane = { path = "../../../primitives/message-lane" }
relay-utils = { path = "../utils" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions bridges/relays/substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
anyhow = "1.0"
async-std = "1.9.0"
async-trait = "0.1.42"
codec = { package = "parity-scale-codec", version = "2.0.0" }
Expand All @@ -26,19 +27,19 @@ bp-polkadot = { path = "../../primitives/chains/polkadot" }
bp-runtime = { path = "../../primitives/runtime" }
bp-rialto = { path = "../../primitives/chains/rialto" }
bridge-runtime-common = { path = "../../bin/runtime-common" }
finality-relay = { path = "../finality-relay" }
headers-relay = { path = "../headers-relay" }
messages-relay = { path = "../messages-relay" }
finality-relay = { path = "../generic/finality" }
headers-relay = { path = "../generic/headers" }
messages-relay = { path = "../generic/messages" }
millau-runtime = { path = "../../bin/millau/runtime" }
pallet-bridge-call-dispatch = { path = "../../modules/call-dispatch" }
pallet-finality-verifier = { path = "../../modules/finality-verifier" }
pallet-message-lane = { path = "../../modules/message-lane" }
relay-kusama-client = { path = "../kusama-client" }
relay-millau-client = { path = "../millau-client" }
relay-polkadot-client = { path = "../polkadot-client" }
relay-rialto-client = { path = "../rialto-client" }
relay-substrate-client = { path = "../substrate-client" }
relay-utils = { path = "../utils" }
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-utils = { path = "../generic/utils" }
rialto-runtime = { path = "../../bin/rialto/runtime" }

# Substrate Dependencies
Expand Down
Loading

0 comments on commit a644b85

Please sign in to comment.