Skip to content

Commit

Permalink
Manta v4201 hotfix release (#1165)
Browse files Browse the repository at this point in the history
* Bump spec versions

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add manta frame weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add xcm weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Changelog

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add new weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add benchamrked weights to pallet

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Update CHangelog with 4.2.0-1

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Update CHangelog with 4.2.0-1

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* adjust reserve price to more reasonable number

Signed-off-by: Charles Ferrell <charlie@manta.network>

---------

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Charles Ferrell <charlie@manta.network>
Co-authored-by: Charles Ferrell <charlie@manta.network>
  • Loading branch information
ghzlatarev and ferrell-code committed Jun 27, 2023
1 parent a0efa40 commit 6548518
Show file tree
Hide file tree
Showing 30 changed files with 1,290 additions and 1,246 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## v4.2.0-1
### Added
- [\#1166](https://github.com/Manta-Network/Manta/pull/1166) Add Force Calls for zkSBT [MACA]

### Changed
- [\#1145](https://github.com/Manta-Network/Manta/pull/1145) Bump block fullness to 50% for calamari [CA]
- [\#1127](https://github.com/Manta-Network/Manta/pull/1127) Add check that public asset is restricted [CA]

### Fixed
- [\#1169](https://github.com/Manta-Network/Manta/pull/1169) Fix check-tests CI workflow [MACA]
- [\#1173](https://github.com/Manta-Network/Manta/pull/1173) Add missing runtime-benchmarks features [MACA]

## v4.2.0
### Added
- [\#1138](https://github.com/Manta-Network/Manta/pull/1138) Check manta and calamari lease expiration [MACA]
Expand Down
158 changes: 81 additions & 77 deletions pallets/manta-sbt/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
//! Autogenerated weights for pallet_manta_sbt
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dolphin-dev"), DB CACHE: 1024
//! DATE: 2023-06-26, STEPS: `50`, REPEAT: 40, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/manta
// ./target/production/manta
// benchmark
// pallet
// --chain=dolphin-dev
// --chain=manta-dev
// --steps=50
// --repeat=40
// --pallet=pallet_manta_sbt
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --output=./pallets/manta-sbt/src/weights.rs
// --output=./scripts/benchmarking/frame-weights-output/pallet_manta_sbt.rs
// --template=.github/resources/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
Expand Down Expand Up @@ -68,30 +68,30 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Timestamp Now (r:1 w:0)
// Storage: MantaSbt PublicMintList (r:1 w:0)
// Storage: MantaSbt ReservedIds (r:1 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn to_private() -> Weight {
// Minimum execution time: 47_972_204 nanoseconds.
Weight::from_ref_time(50_918_770_000)
.saturating_add(T::DbWeight::get().reads(6))
// Minimum execution time: 39_355_971 nanoseconds.
Weight::from_ref_time(39_453_744_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: MantaSbt ReservedIds (r:1 w:1)
// Storage: MantaSbt FreeReserveAccount (r:1 w:0)
// Storage: System Account (r:1 w:1)
// Storage: MantaSbt NextSbtId (r:1 w:1)
fn reserve_sbt() -> Weight {
// Minimum execution time: 88_743 nanoseconds.
Weight::from_ref_time(95_567_000)
// Minimum execution time: 50_199 nanoseconds.
Weight::from_ref_time(55_043_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: MantaSbt AllowlistAccount (r:0 w:1)
fn change_allowlist_account() -> Weight {
// Minimum execution time: 29_098 nanoseconds.
Weight::from_ref_time(37_514_000)
// Minimum execution time: 16_000 nanoseconds.
Weight::from_ref_time(16_280_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:0)
Expand All @@ -100,87 +100,89 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt NextSbtId (r:1 w:1)
fn allowlist_evm_account() -> Weight {
// Minimum execution time: 62_902 nanoseconds.
Weight::from_ref_time(81_725_000)
// Minimum execution time: 30_138 nanoseconds.
Weight::from_ref_time(31_160_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: MantaSbt NextMintId (r:1 w:1)
// Storage: MantaSbt PublicMintList (r:0 w:1)
// Storage: MantaSbt MintIdRegistry (r:0 w:1)
fn new_mint_info() -> Weight {
// Minimum execution time: 47_890 nanoseconds.
Weight::from_ref_time(49_807_000)
// Minimum execution time: 18_710 nanoseconds.
Weight::from_ref_time(19_166_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:1)
// Storage: MantaSbt PublicMintList (r:0 w:1)
fn update_mint_info() -> Weight {
// Minimum execution time: 48_480 nanoseconds.
Weight::from_ref_time(54_145_000)
// Minimum execution time: 21_958 nanoseconds.
Weight::from_ref_time(22_914_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: System BlockHash (r:1 w:0)
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn mint_sbt_eth() -> Weight {
// Minimum execution time: 46_539_662 nanoseconds.
Weight::from_ref_time(52_815_785_000)
.saturating_add(T::DbWeight::get().reads(6))
// Minimum execution time: 39_468_616 nanoseconds.
Weight::from_ref_time(39_560_727_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: MantaSbt AllowlistAccount (r:0 w:1)
fn change_free_reserve_account() -> Weight {
// Minimum execution time: 26_614 nanoseconds.
Weight::from_ref_time(29_647_000)
// Minimum execution time: 15_919 nanoseconds.
Weight::from_ref_time(16_287_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: MantaSbt EvmAccountAllowlist (r:0 w:1)
fn remove_allowlist_evm_account() -> Weight {
// Minimum execution time: 30_627 nanoseconds.
Weight::from_ref_time(39_749_000)
// Minimum execution time: 16_210 nanoseconds.
Weight::from_ref_time(17_519_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: MantaSbt NextSbtId (r:0 w:1)
fn set_next_sbt_id() -> Weight {
// Minimum execution time: 27_380 nanoseconds.
Weight::from_ref_time(28_908_000)
// Minimum execution time: 15_180 nanoseconds.
Weight::from_ref_time(15_479_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: MantaSbt ForceAccount (r:1 w:0)
// Storage: MantaSbt NextSbtId (r:1 w:0)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn force_to_private() -> Weight {
// Minimum execution time: 55_378_134 nanoseconds.
Weight::from_ref_time(65_308_212_000)
.saturating_add(T::DbWeight::get().reads(3))
// Minimum execution time: 39_347_955 nanoseconds.
Weight::from_ref_time(39_386_564_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: MantaSbt ForceAccount (r:1 w:0)
// Storage: MantaSbt NextSbtId (r:1 w:0)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt EvmAccountAllowlist (r:0 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn force_mint_sbt_eth() -> Weight {
// Minimum execution time: 47_541_826 nanoseconds.
Weight::from_ref_time(56_702_108_000)
.saturating_add(T::DbWeight::get().reads(3))
// Minimum execution time: 39_354_533 nanoseconds.
Weight::from_ref_time(39_374_716_000)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: MantaSbt ForceAccount (r:0 w:1)
fn change_force_account() -> Weight {
// Minimum execution time: 26_178 nanoseconds.
Weight::from_ref_time(26_983_000)
// Minimum execution time: 15_851 nanoseconds.
Weight::from_ref_time(16_229_000)
.saturating_add(T::DbWeight::get().writes(1))
}
}
Expand All @@ -191,30 +193,30 @@ impl WeightInfo for () {
// Storage: Timestamp Now (r:1 w:0)
// Storage: MantaSbt PublicMintList (r:1 w:0)
// Storage: MantaSbt ReservedIds (r:1 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn to_private() -> Weight {
// Minimum execution time: 47_972_204 nanoseconds.
Weight::from_ref_time(50_918_770_000)
.saturating_add(RocksDbWeight::get().reads(6))
// Minimum execution time: 39_355_971 nanoseconds.
Weight::from_ref_time(39_453_744_000)
.saturating_add(RocksDbWeight::get().reads(7))
.saturating_add(RocksDbWeight::get().writes(5))
}
// Storage: MantaSbt ReservedIds (r:1 w:1)
// Storage: MantaSbt FreeReserveAccount (r:1 w:0)
// Storage: System Account (r:1 w:1)
// Storage: MantaSbt NextSbtId (r:1 w:1)
fn reserve_sbt() -> Weight {
// Minimum execution time: 88_743 nanoseconds.
Weight::from_ref_time(95_567_000)
// Minimum execution time: 50_199 nanoseconds.
Weight::from_ref_time(55_043_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: MantaSbt AllowlistAccount (r:0 w:1)
fn change_allowlist_account() -> Weight {
// Minimum execution time: 29_098 nanoseconds.
Weight::from_ref_time(37_514_000)
// Minimum execution time: 16_000 nanoseconds.
Weight::from_ref_time(16_280_000)
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:0)
Expand All @@ -223,87 +225,89 @@ impl WeightInfo for () {
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt NextSbtId (r:1 w:1)
fn allowlist_evm_account() -> Weight {
// Minimum execution time: 62_902 nanoseconds.
Weight::from_ref_time(81_725_000)
// Minimum execution time: 30_138 nanoseconds.
Weight::from_ref_time(31_160_000)
.saturating_add(RocksDbWeight::get().reads(5))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: MantaSbt NextMintId (r:1 w:1)
// Storage: MantaSbt PublicMintList (r:0 w:1)
// Storage: MantaSbt MintIdRegistry (r:0 w:1)
fn new_mint_info() -> Weight {
// Minimum execution time: 47_890 nanoseconds.
Weight::from_ref_time(49_807_000)
// Minimum execution time: 18_710 nanoseconds.
Weight::from_ref_time(19_166_000)
.saturating_add(RocksDbWeight::get().reads(1))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:1)
// Storage: MantaSbt PublicMintList (r:0 w:1)
fn update_mint_info() -> Weight {
// Minimum execution time: 48_480 nanoseconds.
Weight::from_ref_time(54_145_000)
// Minimum execution time: 21_958 nanoseconds.
Weight::from_ref_time(22_914_000)
.saturating_add(RocksDbWeight::get().reads(1))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: MantaSbt MintIdRegistry (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: System BlockHash (r:1 w:0)
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn mint_sbt_eth() -> Weight {
// Minimum execution time: 46_539_662 nanoseconds.
Weight::from_ref_time(52_815_785_000)
.saturating_add(RocksDbWeight::get().reads(6))
// Minimum execution time: 39_468_616 nanoseconds.
Weight::from_ref_time(39_560_727_000)
.saturating_add(RocksDbWeight::get().reads(7))
.saturating_add(RocksDbWeight::get().writes(5))
}
// Storage: MantaSbt AllowlistAccount (r:0 w:1)
fn change_free_reserve_account() -> Weight {
// Minimum execution time: 26_614 nanoseconds.
Weight::from_ref_time(29_647_000)
// Minimum execution time: 15_919 nanoseconds.
Weight::from_ref_time(16_287_000)
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: MantaSbt EvmAccountAllowlist (r:0 w:1)
fn remove_allowlist_evm_account() -> Weight {
// Minimum execution time: 30_627 nanoseconds.
Weight::from_ref_time(39_749_000)
// Minimum execution time: 16_210 nanoseconds.
Weight::from_ref_time(17_519_000)
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: MantaSbt NextSbtId (r:0 w:1)
fn set_next_sbt_id() -> Weight {
// Minimum execution time: 27_380 nanoseconds.
Weight::from_ref_time(28_908_000)
// Minimum execution time: 15_180 nanoseconds.
Weight::from_ref_time(15_479_000)
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: MantaSbt ForceAccount (r:1 w:0)
// Storage: MantaSbt NextSbtId (r:1 w:0)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn force_to_private() -> Weight {
// Minimum execution time: 55_378_134 nanoseconds.
Weight::from_ref_time(65_308_212_000)
.saturating_add(RocksDbWeight::get().reads(3))
// Minimum execution time: 39_347_955 nanoseconds.
Weight::from_ref_time(39_386_564_000)
.saturating_add(RocksDbWeight::get().reads(5))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: MantaSbt ForceAccount (r:1 w:0)
// Storage: MantaSbt NextSbtId (r:1 w:0)
// Storage: MantaSbt SbtMetadataV2 (r:1 w:1)
// Storage: MantaSbt EvmAccountAllowlist (r:1 w:1)
// Storage: MantaSbt UtxoSet (r:1 w:1)
// Storage: MantaSbt ShardTrees (r:1 w:1)
// Storage: MantaSbt EvmAccountAllowlist (r:0 w:1)
// Storage: MantaSbt Shards (r:0 w:1)
// Storage: MantaSbt SbtMetadataV2 (r:0 w:1)
fn force_mint_sbt_eth() -> Weight {
// Minimum execution time: 47_541_826 nanoseconds.
Weight::from_ref_time(56_702_108_000)
.saturating_add(RocksDbWeight::get().reads(3))
// Minimum execution time: 39_354_533 nanoseconds.
Weight::from_ref_time(39_374_716_000)
.saturating_add(RocksDbWeight::get().reads(6))
.saturating_add(RocksDbWeight::get().writes(5))
}
// Storage: MantaSbt ForceAccount (r:0 w:1)
fn change_force_account() -> Weight {
// Minimum execution time: 26_178 nanoseconds.
Weight::from_ref_time(26_983_000)
// Minimum execution time: 15_851 nanoseconds.
Weight::from_ref_time(16_229_000)
.saturating_add(RocksDbWeight::get().writes(1))
}
}
2 changes: 1 addition & 1 deletion runtime/calamari/src/assets_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl pallet_manta_sbt::Config for Runtime {
type PalletId = MantaSbtPalletId;
type Currency = Balances;
type MintsPerReserve = ConstU16<5>;
type ReservePrice = ConstU128<{ 100_000 * KMA }>;
type ReservePrice = ConstU128<{ 5_000 * KMA }>;
type SbtMetadataBound = ConstU32<300>;
type RegistryBound = ConstU32<300>;
type AdminOrigin = EitherOfDiverse<
Expand Down
2 changes: 1 addition & 1 deletion runtime/calamari/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("calamari"),
impl_name: create_runtime_str!("calamari"),
authoring_version: 2,
spec_version: 4200,
spec_version: 4201,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 14,
Expand Down
2 changes: 1 addition & 1 deletion runtime/dolphin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("dolphin"),
impl_name: create_runtime_str!("dolphin"),
authoring_version: 2,
spec_version: 4200,
spec_version: 4201,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 8,
Expand Down
2 changes: 1 addition & 1 deletion runtime/manta/src/assets_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl pallet_manta_sbt::Config for Runtime {
type PalletId = MantaSbtPalletId;
type Currency = Balances;
type MintsPerReserve = ConstU16<5>;
type ReservePrice = ConstU128<{ 100_000 * MANTA }>;
type ReservePrice = ConstU128<{ 50 * MANTA }>;
type SbtMetadataBound = ConstU32<300>;
type RegistryBound = ConstU32<300>;
type AdminOrigin = EitherOfDiverse<
Expand Down
Loading

0 comments on commit 6548518

Please sign in to comment.