From ccfc1082f8bdf149205eb0d59bfc0c67eaf6cad8 Mon Sep 17 00:00:00 2001 From: bear Date: Wed, 1 Sep 2021 16:52:35 +0800 Subject: [PATCH] Remove unnessary deps (#1101) --- bridges/modules/messages/Cargo.toml | 2 -- bridges/modules/messages/src/weights_ext.rs | 9 +++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bridges/modules/messages/Cargo.toml b/bridges/modules/messages/Cargo.toml index a2febf50af..0cb14764f3 100644 --- a/bridges/modules/messages/Cargo.toml +++ b/bridges/modules/messages/Cargo.toml @@ -17,7 +17,6 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] } bp-message-dispatch = { path = "../../primitives/message-dispatch", default-features = false } bp-messages = { path = "../../primitives/messages", default-features = false } -bp-rialto = { path = "../../primitives/chain-rialto", default-features = false } bp-runtime = { path = "../../primitives/runtime", default-features = false } # Substrate Dependencies @@ -41,7 +40,6 @@ std = [ "bp-message-dispatch/std", "bp-messages/std", "bp-runtime/std", - "bp-rialto/std", "codec/std", "frame-support/std", "frame-system/std", diff --git a/bridges/modules/messages/src/weights_ext.rs b/bridges/modules/messages/src/weights_ext.rs index b17be922f5..c88ec47d72 100644 --- a/bridges/modules/messages/src/weights_ext.rs +++ b/bridges/modules/messages/src/weights_ext.rs @@ -29,6 +29,11 @@ pub const EXPECTED_DEFAULT_MESSAGE_LENGTH: u32 = 128; /// we're checking here would fit 1KB. const SIGNED_EXTENSIONS_SIZE: u32 = 1024; +/// Number of extra bytes (excluding size of storage value itself) of storage proof, built at +/// Rialto chain. This mostly depends on number of entries (and their density) in the storage trie. +/// Some reserve is reserved to account future chain growth. +pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; + /// Ensure that weights from `WeightInfoExt` implementation are looking correct. pub fn ensure_weights_are_correct( expected_default_message_delivery_tx_weight: Weight, @@ -344,12 +349,12 @@ pub trait WeightInfoExt: WeightInfo { impl WeightInfoExt for () { fn expected_extra_storage_proof_size() -> u32 { - bp_rialto::EXTRA_STORAGE_PROOF_SIZE + EXTRA_STORAGE_PROOF_SIZE } } impl WeightInfoExt for crate::weights::RialtoWeight { fn expected_extra_storage_proof_size() -> u32 { - bp_rialto::EXTRA_STORAGE_PROOF_SIZE + EXTRA_STORAGE_PROOF_SIZE } }