Skip to content

Commit

Permalink
Ab/fix weight bound (#257)
Browse files Browse the repository at this point in the history
* fix bogus weight for xcm execution. cpoy-paste from karura

* tried many things, nothing fixes weight error

* revert all changes and try anew

* fix xcm weight estimates

* cleanup unnecessary changes

* cleanup

* bump version
  • Loading branch information
brenzi authored Jan 31, 2024
1 parent 810f2cb commit 792f591
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-collator"
description = "The Integritee parachain collator binary"
# align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag
version = "1.7.7"
version = "1.7.8"
authors = ["Integritee AG <hello@integritee.network>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/integritee-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-runtime"
description = "The Integritee parachain runtime"
# patch revision must match runtime spec_version
version = "1.7.43"
version = "1.7.44"
authors = ["Integritee AG <hello@integritee.network>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/integritee-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("integritee-parachain"),
impl_name: create_runtime_str!("integritee-full"),
authoring_version: 2,
spec_version: 43,
spec_version: 44,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
Weight::from_parts(22_338_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: ParachainInfo ParachainId (r:1 w:0)
Expand All @@ -79,8 +79,7 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
Weight::from_parts(10_240_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: PolkadotXcm SupportedVersion (r:0 w:1)
Expand Down
7 changes: 4 additions & 3 deletions polkadot-parachains/integritee-runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ parameter_types! {

pub SelfReserve: MultiLocation = MultiLocation {
parents:0,
//todo: why not `interior: Here` ?
interior: Junctions::X1(TEER_GENERAL_KEY)
};
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
Expand Down Expand Up @@ -228,7 +229,7 @@ where

parameter_types! {
// Weight for one XCM operation. Copied from moonbeam.
pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub UnitWeightCost: Weight = Weight::from_parts(1_000_000u64, DEFAULT_PROOF_SIZE);

// One TEER buys 1 second of weight.
pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), TEER);
Expand Down Expand Up @@ -379,10 +380,10 @@ parameter_types! {
}

/// Copied from moonbeam: https://github.com/PureStake/moonbeam/blob/095031d171b0c163e5649ee35acbc36eef681a82/primitives/xcm/src/ethereum_xcm.rs#L34
pub const DEFAULT_PROOF_SIZE: u64 = 128 * 1024;
pub const DEFAULT_PROOF_SIZE: u64 = 1024;

parameter_types! {
pub const BaseXcmWeight: Weight= Weight::from_parts(200_000_000u64, DEFAULT_PROOF_SIZE);
pub const BaseXcmWeight: Weight= Weight::from_parts(1_000_000u64, DEFAULT_PROOF_SIZE);
pub const MaxAssetsForTransfer: usize = 2;
}

Expand Down

0 comments on commit 792f591

Please sign in to comment.