Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2,527 changes: 1,514 additions & 1,013 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,44 +67,44 @@ bench: bench-loans bench-liquid-staking bench-amm bench-amm-router bench-crowdlo

.PHONY: bench-farming
bench-farming:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-farming --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/farming/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-farming --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/farming/src/weights.rs

.PHONY: bench-loans
bench-loans:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-loans --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/loans/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-loans --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/loans/src/weights.rs

.PHONY: bench-crowdloans
bench-crowdloans:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-crowdloans --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/crowdloans/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-crowdloans --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/crowdloans/src/weights.rs

.PHONY: bench-bridge
bench-bridge:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-bridge --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/bridge/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-bridge --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/bridge/src/weights.rs

.PHONY: bench-xcm-helper
bench-xcm-helper:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-xcm-helper --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/xcm-helper/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-xcm-helper --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/xcm-helper/src/weights.rs

.PHONY: bench-amm
bench-amm:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-amm --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/amm/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-amm --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/amm/src/weights.rs

.PHONY: bench-liquid-staking
bench-liquid-staking:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-liquid-staking --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/liquid-staking/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-liquid-staking --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/liquid-staking/src/weights.rs

.PHONY: bench-amm-router
bench-amm-router:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-router --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/router/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-router --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/router/src/weights.rs


.PHONY: bench-streaming
bench-streaming:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-streaming --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/stream/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-streaming --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/stream/src/weights.rs

.PHONY: bench-asset-registry
bench-asset-registry:
cargo run --release --features runtime-benchmarks -- benchmark --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-asset-registry --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/asset-registry/src/weights.rs
cargo run --release --features runtime-benchmarks -- benchmark pallet --chain=$(CHAIN) --execution=wasm --wasm-execution=compiled --pallet=pallet-asset-registry --extrinsic='*' --steps=50 --repeat=20 --heap-pages=4096 --template=./.maintain/frame-weight-template.hbs --output=./pallets/asset-registry/src/weights.rs

.PHONY: lint
lint:
Expand Down
107 changes: 53 additions & 54 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
[package]
authors = ['Parallel Team']
edition = '2021'
homepage = 'https://parallel.fi'
license = 'Apache'
name = 'runtime-integration-tests'
repository = 'https://github.com/parallel-finance/parallel'
version = '1.8.4'
authors = ['Parallel Team']
edition = '2021'
homepage = 'https://parallel.fi'
license = 'Apache'
name = 'runtime-integration-tests'
repository = 'https://github.com/parallel-finance/parallel'
version = '1.8.4'

[dependencies]
codec = { package = 'parity-scale-codec', version = '2.3.1', default-features = false, features = ['derive'] }
hex-literal = '0.3.3'
serde = { version = '1.0.136', features = ['derive'], optional = true }
serde_json = '1.0.68'
hex = { version = '0.4' }
smallvec = '1.6.1'
static_assertions = '1.1.0'
codec = { package = 'parity-scale-codec', version = '3.0.0', default-features = false, features = ['derive'] }
hex = { version = '0.4' }
hex-literal = '0.3.3'
serde = { version = '1.0.136', features = ['derive'], optional = true }
serde_json = '1.0.79'
smallvec = '1.6.1'
static_assertions = '1.1.0'

# Substrate
frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }

# Polkadot dependencies
pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.17'}
pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.17' }
cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }

# ORML dependencies
orml-oracle = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git'}
orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git' }
orml-vesting = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git' }
orml-xcm = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git' }
orml-xcm-support = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git' }
orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git' }
orml-oracle = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }
orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }
orml-vesting = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }
orml-xcm = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }
orml-xcm-support = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }
orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', branch = 'polkadot-v0.9.19' }

# Parallel dependencies
pallet-asset-registry = { path = '../pallets/asset-registry' }
pallet-amm = { path = '../pallets/amm' }
pallet-asset-registry = { path = '../pallets/asset-registry' }
pallet-bridge = { path = '../pallets/bridge' }
pallet-crowdloans = { path = '../pallets/crowdloans' }
pallet-currency-adapter = { path = '../pallets/currency-adapter' }
Expand All @@ -67,18 +67,17 @@ pallet-router-rpc-runtime-api = { path = '../pallets/router/rpc/runtime-api' }
pallet-traits = { path = '../pallets/traits' }
pallet-xcm-helper = { path = '../pallets/xcm-helper' }
primitives = { package = 'parallel-primitives', path = '../primitives' }
vanilla-runtime = { path = '../runtime/vanilla' }
vanilla-runtime = { path = '../runtime/vanilla' }

[dev-dependencies]
env_logger = '0.9.0'
log = '0.4.14'
sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17'}
sp-trie = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.17' }
polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.17' }
kusama-runtime = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.17' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.17' }
cumulus-test-relay-sproof-builder = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.17' }
statemine-runtime = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.17' }
xcm-emulator = { git = 'https://github.com/shaunxw/xcm-simulator', rev = '24ccbce563d1f99019b4cdfa2f3af4e99bac0dfc' }

cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
cumulus-test-relay-sproof-builder = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
env_logger = '0.9.0'
kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
log = '0.4.14'
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.19' }
sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.19' }
statemine-runtime = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.19' }
xcm-emulator = { git = 'https://github.com/shaunxw/xcm-simulator.git', rev = '6c358483d8e119cd3b631ebb14d3b0cf0041d94e' }

Choose a reason for hiding this comment

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

🚫 [detect-secrets] reported by reviewdog 🐶

  • Hex High Entropy String

14 changes: 7 additions & 7 deletions integration-tests/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use crate::setup::*;
use cumulus_primitives_core::ParaId;
use frame_support::traits::GenesisBuild;
use polkadot_primitives::v1::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_primitives::v2::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_runtime_parachains::configuration::HostConfiguration;
use primitives::AccountId;
use sp_runtime::traits::AccountIdConversion;
Expand Down Expand Up @@ -63,9 +63,8 @@ decl_test_network! {

fn default_parachains_host_configuration() -> HostConfiguration<BlockNumber> {
HostConfiguration {
minimum_validation_upgrade_delay: 5,
validation_upgrade_cooldown: 5u32,
validation_upgrade_delay: 5,
validation_upgrade_cooldown: 2u32,
validation_upgrade_delay: 2,
code_retention_period: 1200,
max_code_size: MAX_CODE_SIZE,
max_pov_size: MAX_POV_SIZE,
Expand All @@ -75,9 +74,9 @@ fn default_parachains_host_configuration() -> HostConfiguration<BlockNumber> {
thread_availability_period: 4,
max_upward_queue_count: 8,
max_upward_queue_size: 1024 * 1024,
max_downward_message_size: 1024,
ump_service_total_weight: 4 * 1_000_000_000,
max_upward_message_size: 1024 * 1024,
max_downward_message_size: 1024 * 1024,
ump_service_total_weight: 100_000_000_000,
max_upward_message_size: 50 * 1024,
max_upward_message_num_per_candidate: 5,
hrmp_sender_deposit: 0,
hrmp_recipient_deposit: 0,
Expand All @@ -95,6 +94,7 @@ fn default_parachains_host_configuration() -> HostConfiguration<BlockNumber> {
needed_approvals: 2,
relay_vrf_modulo_samples: 2,
zeroth_delay_tranche_width: 0,
minimum_validation_upgrade_delay: 5,
..Default::default()
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/src/kusama_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn transfer_to_relay_chain() {
println!("heiko para account in relaychain:{:?}", para_acc);
assert_eq!(
kusama_runtime::Balances::free_balance(&AccountId::from(BOB)),
999_893_333_340 //xcm fee in kusama is 106_666_660~=0.015$
999_834_059_328 //xcm fee in kusama is 165_940_672 ~=0.015$
);
});
}
2 changes: 1 addition & 1 deletion integration-tests/src/statemine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub const RMRK_DECIMAL: u8 = 10;
pub const RMRK_WEIGHT_PER_SEC: u128 = 100000000000;
pub const HEIKO_RMRK_ASSET_ID: u32 = 4187061565;
pub const STATEMINE_FEE_AMOUNT: u128 = 8_000_000_000;
pub const RELAY_FEE_AMOUNT: u128 = 106_666_660;
pub const RELAY_FEE_AMOUNT: u128 = 165_940_672;

pub fn rmrk(n: f64) -> Balance {
(n as u128) * 10u128.pow(RMRK_DECIMAL.into())
Expand Down
Loading