Skip to content

Commit 302aabd

Browse files
authored
Merge branch 'develop' into settlement-small-improvements
2 parents f0da77a + d9110b4 commit 302aabd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+97
-374
lines changed

.maintain/frame-weight-template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#![allow(unused_parens)]
3131
#![allow(unused_imports)]
3232

33-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
33+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
3434

3535
/// Weights for {{pallet}} using the Substrate node and recommended hardware.
3636
pub struct SubstrateWeight;

Cargo.lock

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/nft_royalty/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/runtime-tester/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/settlements/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/upgradeable-polymesh-ink/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/upgradeable-polymesh-ink/examples/simple/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/wrapped-polyx/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/contracts/call_runtime-tester/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metadata-tools/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/multisig/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ use pallet_permissions::with_call_metadata;
9090
use polymesh_primitives::multisig::{ProposalState, ProposalVoteCount};
9191
use polymesh_primitives::{
9292
extract_auth, storage_migration_ver, AuthorizationData, IdentityId, KeyRecord, Permissions,
93-
Signatory,
93+
RocksDbWeight as DbWeight, Signatory,
9494
};
95-
//use polymesh_runtime_common::RocksDbWeight as DbWeight;
96-
use frame_support::weights::constants::RocksDbWeight as DbWeight;
9795

9896
pub trait WeightInfo {
9997
fn create_multisig(signers: u32) -> Weight;

pallets/runtime/common/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub use sp_runtime::{Perbill, Permill};
4242

4343
use pallet_balances as balances;
4444
use polymesh_primitives::constants::currency::*;
45+
pub use polymesh_primitives::RocksDbWeight;
4546
use polymesh_primitives::{Balance, BlockNumber, IdentityId, Moment};
4647

4748
pub use cdd_check::CddChecker;
@@ -85,14 +86,6 @@ parameter_types! {
8586
pub const BlockExecutionWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_MILLIS.saturating_mul(20));
8687
/// 0.65 ms is needed to process an empty extrinsic.
8788
pub const ExtrinsicBaseWeight: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_MICROS.saturating_mul(650));
88-
/// When the read/writes are cached/buffered, they take 25/100 microseconds on NVMe disks.
89-
/// When they are uncached, they take 250/450 microseconds on NVMe disks.
90-
/// Most read will be cached and writes will be buffered in production.
91-
/// We are taking a number slightly higher than what cached suggest to allow for some extra breathing room.
92-
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
93-
read: 50 * WEIGHT_REF_TIME_PER_MICROS, // ~50 µs @ 100,000 items
94-
write: 200 * WEIGHT_REF_TIME_PER_MICROS, // ~200 µs @ 100,000 items
95-
};
9689
/// This implies a 100 POLYX fee per MB of transaction length
9790
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
9891
/// We want the noop transaction to cost 0.03 POLYX

pallets/runtime/common/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ macro_rules! misc_pallet_impls {
7979
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
8080
type BlockHashCount = polymesh_runtime_common::BlockHashCount;
8181
/// The weight of database operations that the runtime can invoke.
82-
type DbWeight = polymesh_runtime_common::RocksDbWeight;
82+
type DbWeight = polymesh_primitives::RocksDbWeight;
8383
/// Version of the runtime.
8484
type Version = Version;
8585
/// Converts a module to the index of the module in `construct_runtime!`.

pallets/weights/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pallet-sto = { workspace = true, default-features = false }
4141
pallet-treasury = { workspace = true, default-features = false }
4242
pallet-utility = { workspace = true, default-features = false }
4343
polymesh-contracts = { workspace = true, default-features = false }
44-
polymesh-runtime-common = { workspace = true, default-features = false }
44+
polymesh-primitives = { workspace = true, default-features = false }
4545

4646
[features]
4747
default = ["std"]
@@ -74,5 +74,5 @@ std = [
7474
"pallet-treasury/std",
7575
"pallet-utility/std",
7676
"polymesh-contracts/std",
77-
"polymesh-runtime-common/std",
77+
"polymesh-primitives/std",
7878
]

pallets/weights/src/frame_system.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for frame_system using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

pallets/weights/src/pallet_asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for pallet_asset using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

pallets/weights/src/pallet_babe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! Default weights for the Babe Pallet
1919
//! This file was not auto-generated.
2020
21-
use polymesh_runtime_common::{
21+
use polymesh_primitives::{
2222
RocksDbWeight as DbWeight, Weight, WEIGHT_REF_TIME_PER_MICROS, WEIGHT_REF_TIME_PER_NANOS,
2323
};
2424

pallets/weights/src/pallet_balances.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for pallet_balances using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

pallets/weights/src/pallet_capital_distribution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for pallet_capital_distribution using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

pallets/weights/src/pallet_checkpoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for pallet_checkpoint using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

pallets/weights/src/pallet_committee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#![allow(unused_parens)]
4949
#![allow(unused_imports)]
5050

51-
use polymesh_runtime_common::{RocksDbWeight as DbWeight, Weight};
51+
use polymesh_primitives::{RocksDbWeight as DbWeight, Weight};
5252

5353
/// Weights for pallet_committee using the Substrate node and recommended hardware.
5454
pub struct SubstrateWeight;

0 commit comments

Comments
 (0)