Skip to content

Commit

Permalink
integration tests with workspace dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Nov 22, 2023
1 parent 66b5ec5 commit f2676da
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 255 deletions.
36 changes: 31 additions & 5 deletions Cargo.lock

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

75 changes: 53 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ scale-info = { version = "2.3.0", default-features = false, features = ["derive"
log = "0.4"
getrandom = { version = "0.2", features = ["js"] }
static_assertions = "1.1.0"

# Parachain
lazy_static = "1.4.0"
thiserror = "1.0.30"
tokio = { version = "1.15", features = ["macros"] }
tracing-subscriber = "0.2"
ethabi = { version = "16.0", default-features = false }
ethereum = { version = "0.14.0", default-features = false }

# Cumulus
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
Expand All @@ -99,22 +105,41 @@ cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", def
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }

pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.43" }

# polkadot dependencies
# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }

xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }

# Primitives
rococo-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }

# Substrate
node-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sc-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sc-client-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false ,branch = "polkadot-v0.9.43" }
sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
Expand All @@ -124,8 +149,8 @@ sp-session = { git = "https://github.com/paritytech/substrate", default-features
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }

# Frame
sp-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, features = [
Expand All @@ -135,8 +160,9 @@ frame-system = { git = "https://github.com/paritytech/substrate", default-featur
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }

# Substrate pallets
pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
Expand Down Expand Up @@ -167,7 +193,6 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.43" }
mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" }

# Frontier
fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
Expand All @@ -183,14 +208,19 @@ pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/f
pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }

# Chainbridge
chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" }

# Moonbeam
moonbeam-relay-encoder = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" }
xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" }
pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "96ac7576f93bb6828415bf3edeef9e8c4b5b4adf" }

# Centrifuge organization
fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" }
fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v0.9.43" }
chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v0.9.43" }

# Foss3
mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v0.9.43" }

# Centrifuge pallets
axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false }
liquidity-pools-gateway-routers = { path = "pallets/liquidity-pools-gateway/routers", default-features = false }
Expand Down Expand Up @@ -228,12 +258,13 @@ cfg-primitives = { path = "libs/primitives", default-features = false }
cfg-traits = { path = "libs/traits", default-features = false }
cfg-types = { path = "libs/types", default-features = false }
cfg-utils = { path = "libs/utils", default-features = false }
cfg-mocks = { path = "libs/mocks", default-features = false }

# Runtimes
# Centrifuge uuntimes
runtime-common = { path = "runtime/common", default-features = false }

# Testing
cfg-mocks = { path = "libs/mocks", default-features = false }
development-runtime = { path = "runtime/development", default-features = false }
altair-runtime = { path = "runtime/altair", default-features = false }
centrifuge-runtime = { path = "runtime/centrifuge", default-features = false }

# Build dependencies
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
Expand Down Expand Up @@ -323,7 +354,7 @@ runtime-common = { path = "runtime/common" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "polkadot-v0.9.43" }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "polkadot-v0.9.43" }
# integration testing
runtime-integration-tests = { path = "runtime/integration-tests", optional = true, default-features = false }
#runtime-integration-tests = { path = "runtime/integration-tests", optional = true, default-features = false }

# xcm
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
Expand Down Expand Up @@ -387,7 +418,7 @@ std = [
"pallet-pool-system/std",
"polkadot-primitives/std",
"runtime-common/std",
"runtime-integration-tests/std",
#"runtime-integration-tests/std",
"sc-executor/std",
"sc-service/rocksdb",
"serde/std",
Expand Down Expand Up @@ -426,7 +457,7 @@ runtime-benchmarks = [
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"runtime-integration-tests/runtime-benchmarks",
#"runtime-integration-tests/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
Expand Down Expand Up @@ -456,7 +487,7 @@ fast-runtime = [
"altair-runtime/fast-runtime",
"centrifuge-runtime/fast-runtime",
"development-runtime/fast-runtime",
"runtime-integration-tests/fast-runtime",
#"runtime-integration-tests/fast-runtime",
]

#
Expand Down
3 changes: 1 addition & 2 deletions runtime/centrifuge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ documentation.workspace = true
codec = { package = "parity-scale-codec", workspace = true }
getrandom = { workspace = true }
hex = { workspace = true }
hex-literal = { workspace = true, optional = true }
hex-literal = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }
static_assertions = { workspace = true }
Expand Down Expand Up @@ -270,7 +270,6 @@ std = [

runtime-benchmarks = [
# Enabling optional
"hex-literal",
"frame-system-benchmarking/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ impl_runtime_apis! {
}

fn metadata_at_version(version: u32) -> Option<sp_core::OpaqueMetadata> { Runtime::metadata_at_version(version) }
fn metadata_versions() -> frame_benchmarking::Vec<u32> { Runtime::metadata_versions() }
fn metadata_versions() -> sp_std::vec::Vec<u32> { Runtime::metadata_versions() }
}

impl sp_block_builder::BlockBuilder<Block> for Runtime {
Expand Down
Loading

0 comments on commit f2676da

Please sign in to comment.