Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/1027 #1782

Merged
merged 12 commits into from
Mar 29, 2024
Merged
6 changes: 3 additions & 3 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 node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is-it-maintained-open-issues = { repository = "centrifuge/centrifuge-chain" }

[package]
name = "centrifuge-chain"
version = "0.10.37"
version = "0.10.39"
description = "Centrifuge chain implementation in Rust."
build = "build.rs"
default-run = "centrifuge-chain"
Expand Down
2 changes: 1 addition & 1 deletion pallets/loans/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ pub mod pallet {
/// `ClosedLoan` because here we try to minimize the iteration speed over
/// all active loans in a pool.
#[pallet::storage]
pub(crate) type ActiveLoans<T: Config> = StorageMap<
pub type ActiveLoans<T: Config> = StorageMap<
_,
Blake2_128Concat,
T::PoolId,
Expand Down
6 changes: 3 additions & 3 deletions pallets/oracle-collection/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mod benchmarks {
use super::*;

#[benchmark]
fn propose_update_collection_info(n: Linear<1, 10>) -> Result<(), BenchmarkError> {
fn propose_update_collection_info(n: Linear<1, 5>) -> Result<(), BenchmarkError> {
#[cfg(test)]
init_mocks();

Expand All @@ -85,7 +85,7 @@ mod benchmarks {
}

#[benchmark]
fn apply_update_collection_info(n: Linear<1, 10>) -> Result<(), BenchmarkError> {
fn apply_update_collection_info(n: Linear<1, 5>) -> Result<(), BenchmarkError> {
#[cfg(test)]
init_mocks();

Expand All @@ -109,7 +109,7 @@ mod benchmarks {
}

#[benchmark]
fn update_collection(n: Linear<1, 10>, m: Linear<1, 10>) -> Result<(), BenchmarkError> {
fn update_collection(n: Linear<1, 5>, m: Linear<1, 100>) -> Result<(), BenchmarkError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 100?

#[cfg(test)]
init_mocks();

Expand Down
4 changes: 2 additions & 2 deletions pallets/oracle-collection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub const NOW: Timestamp = 1000;

frame_support::parameter_types! {
#[derive(Clone, PartialEq, Eq, Debug, TypeInfo, Encode, Decode, MaxEncodedLen)]
pub const MaxFeedersPerKey: u32 = 10;
pub const MaxFeedersPerKey: u32 = 5;
}

frame_support::construct_runtime!(
Expand Down Expand Up @@ -96,7 +96,7 @@ impl pallet_oracle_collection::Config for Runtime {
type CollectionId = CollectionId;
type FeederId = AccountId;
type IsAdmin = MockIsAdmin;
type MaxCollectionSize = ConstU32<10>;
type MaxCollectionSize = ConstU32<100>;
type MaxFeedersPerKey = MaxFeedersPerKey;
type OracleKey = OracleKey;
type OracleProvider = MockProvider;
Expand Down
7 changes: 4 additions & 3 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,15 +1302,16 @@ impl pallet_rewards::Config<pallet_rewards::Instance2> for Runtime {
}

parameter_types! {
pub const MaxActiveLoansPerPool: u32 = 300;
pub const MaxActiveLoansPerPool: u32 = 1000;
pub const MaxRegisteredPricesPerPool: u32 = 100;
pub const MaxRateCount: u32 = 300; // See #1024
pub const FirstValueFee: Fee = Fee::Balance(deposit(1, pallet_oracle_feed::util::size_of_feed::<Runtime>()));

#[derive(Clone, PartialEq, Eq, Debug, TypeInfo, Encode, Decode, MaxEncodedLen)]
pub const MaxWriteOffPolicySize: u32 = 100;

#[derive(Clone, PartialEq, Eq, Debug, TypeInfo, Encode, Decode, MaxEncodedLen)]
pub const MaxFeedersPerKey: u32 = 10;
pub const MaxFeedersPerKey: u32 = 5;
}

impl pallet_oracle_feed::Config for Runtime {
Expand All @@ -1329,7 +1330,7 @@ impl pallet_oracle_collection::Config for Runtime {
type CollectionId = PoolId;
type FeederId = Feeder<RuntimeOrigin>;
type IsAdmin = PoolAdminCheck<Permissions>;
type MaxCollectionSize = MaxActiveLoansPerPool;
type MaxCollectionSize = MaxRegisteredPricesPerPool;
type MaxFeedersPerKey = MaxFeedersPerKey;
type OracleKey = OracleKey;
type OracleProvider =
Expand Down
10 changes: 5 additions & 5 deletions runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -38,8 +38,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 8_726_000 picoseconds.
Weight::from_parts(9_317_000, 0)
// Minimum execution time: 9_007_000 picoseconds.
Weight::from_parts(9_237_000, 0)
.saturating_add(Weight::from_parts(0, 1594))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -50,8 +50,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 8_666_000 picoseconds.
Weight::from_parts(9_016_000, 0)
// Minimum execution time: 8_756_000 picoseconds.
Weight::from_parts(9_017_000, 0)
.saturating_add(Weight::from_parts(0, 1594))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand Down
18 changes: 9 additions & 9 deletions runtime/altair/src/weights/pallet_anchors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `pallet_anchors`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -42,8 +42,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `334`
// Estimated: `3581`
// Minimum execution time: 39_573_000 picoseconds.
Weight::from_parts(40_445_000, 0)
// Minimum execution time: 42_600_000 picoseconds.
Weight::from_parts(43_291_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `668`
// Estimated: `3581`
// Minimum execution time: 70_332_000 picoseconds.
Weight::from_parts(71_053_000, 0)
// Minimum execution time: 74_199_000 picoseconds.
Weight::from_parts(74_830_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
Expand All @@ -82,8 +82,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `12450`
// Estimated: `260090`
// Minimum execution time: 2_141_176_000 picoseconds.
Weight::from_parts(2_160_262_000, 0)
// Minimum execution time: 2_299_661_000 picoseconds.
Weight::from_parts(2_331_731_000, 0)
.saturating_add(Weight::from_parts(0, 260090))
.saturating_add(T::DbWeight::get().reads(100))
.saturating_add(T::DbWeight::get().writes(100))
Expand Down Expand Up @@ -506,8 +506,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `18324`
// Estimated: `254990`
// Minimum execution time: 1_942_586_000 picoseconds.
Weight::from_parts(1_970_939_000, 0)
// Minimum execution time: 2_049_781_000 picoseconds.
Weight::from_parts(2_069_889_000, 0)
.saturating_add(Weight::from_parts(0, 254990))
.saturating_add(T::DbWeight::get().reads(504))
.saturating_add(T::DbWeight::get().writes(402))
Expand Down
38 changes: 19 additions & 19 deletions runtime/altair/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -38,8 +38,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `52`
// Estimated: `3593`
// Minimum execution time: 84_377_000 picoseconds.
Weight::from_parts(86_001_000, 0)
// Minimum execution time: 92_233_000 picoseconds.
Weight::from_parts(93_315_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -50,8 +50,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `52`
// Estimated: `3593`
// Minimum execution time: 63_528_000 picoseconds.
Weight::from_parts(66_343_000, 0)
// Minimum execution time: 69_450_000 picoseconds.
Weight::from_parts(70_522_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -62,8 +62,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `245`
// Estimated: `3593`
// Minimum execution time: 25_017_000 picoseconds.
Weight::from_parts(25_618_000, 0)
// Minimum execution time: 26_109_000 picoseconds.
Weight::from_parts(26_460_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -74,8 +74,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `245`
// Estimated: `3593`
// Minimum execution time: 35_998_000 picoseconds.
Weight::from_parts(36_809_000, 0)
// Minimum execution time: 38_171_000 picoseconds.
Weight::from_parts(39_053_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -86,8 +86,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `192`
// Estimated: `6196`
// Minimum execution time: 88_505_000 picoseconds.
Weight::from_parts(89_467_000, 0)
// Minimum execution time: 95_259_000 picoseconds.
Weight::from_parts(97_092_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -98,8 +98,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `52`
// Estimated: `3593`
// Minimum execution time: 79_478_000 picoseconds.
Weight::from_parts(80_871_000, 0)
// Minimum execution time: 87_033_000 picoseconds.
Weight::from_parts(87_745_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -110,8 +110,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `245`
// Estimated: `3593`
// Minimum execution time: 29_144_000 picoseconds.
Weight::from_parts(29_986_000, 0)
// Minimum execution time: 30_808_000 picoseconds.
Weight::from_parts(31_258_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -123,11 +123,11 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `176 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 26_740_000 picoseconds.
Weight::from_parts(27_652_000, 0)
// Minimum execution time: 28_694_000 picoseconds.
Weight::from_parts(29_165_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 14_123
.saturating_add(Weight::from_parts(21_488_072, 0).saturating_mul(u.into()))
// Standard Error: 12_713
.saturating_add(Weight::from_parts(22_707_946, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
Expand Down
14 changes: 7 additions & 7 deletions runtime/altair/src/weights/pallet_block_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `pallet_block_rewards`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -44,8 +44,8 @@ impl<T: frame_system::Config> pallet_block_rewards::WeightInfo for WeightInfo<T>
// Proof Size summary in bytes:
// Measured: `583`
// Estimated: `6196`
// Minimum execution time: 87_664_000 picoseconds.
Weight::from_parts(89_066_000, 0)
// Minimum execution time: 92_032_000 picoseconds.
Weight::from_parts(93_797_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
Expand All @@ -56,8 +56,8 @@ impl<T: frame_system::Config> pallet_block_rewards::WeightInfo for WeightInfo<T>
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `3582`
// Minimum execution time: 8_776_000 picoseconds.
Weight::from_parts(9_047_000, 0)
// Minimum execution time: 8_967_000 picoseconds.
Weight::from_parts(9_287_000, 0)
.saturating_add(Weight::from_parts(0, 3582))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -68,8 +68,8 @@ impl<T: frame_system::Config> pallet_block_rewards::WeightInfo for WeightInfo<T>
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `3582`
// Minimum execution time: 8_706_000 picoseconds.
Weight::from_parts(8_937_000, 0)
// Minimum execution time: 8_957_000 picoseconds.
Weight::from_parts(9_308_000, 0)
.saturating_add(Weight::from_parts(0, 3582))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand Down
10 changes: 5 additions & 5 deletions runtime/altair/src/weights/pallet_collator_allowlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `pallet_collator_allowlist`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -40,8 +40,8 @@ impl<T: frame_system::Config> pallet_collator_allowlist::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `3989`
// Minimum execution time: 24_856_000 picoseconds.
Weight::from_parts(25_497_000, 0)
// Minimum execution time: 26_499_000 picoseconds.
Weight::from_parts(27_461_000, 0)
.saturating_add(Weight::from_parts(0, 3989))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -52,8 +52,8 @@ impl<T: frame_system::Config> pallet_collator_allowlist::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `232`
// Estimated: `3497`
// Minimum execution time: 19_006_000 picoseconds.
Weight::from_parts(19_617_000, 0)
// Minimum execution time: 19_957_000 picoseconds.
Weight::from_parts(20_668_000, 0)
.saturating_add(Weight::from_parts(0, 3497))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand Down
Loading
Loading