From bd7138dfeb698d8b74ae070edae365a8a8a3129b Mon Sep 17 00:00:00 2001 From: rustlang-dev Date: Fri, 15 Nov 2024 15:55:29 +0000 Subject: [PATCH 1/3] update tx payment pallet LengthToFee TransactionByteFee --- runtime/src/lib.rs | 11 +++++++---- runtime/src/version.rs | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8cb573eb..7ed443a4 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -150,7 +150,7 @@ pub const MILLISECS_PER_BLOCK: u64 = prod_or_fast!(15_000, 5_000); pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; -pub const MILLI_CTC: u128 = 1_000_000_000_000_000; +pub const CENTS: u128 = CTC / 100; // WARNING: the next should be defined on a single line b/c of // the assertions made in .github/check-for-changes-in-epoch-duration.sh @@ -341,8 +341,8 @@ impl WeightToFeePolynomial for WeightToCtcFee { type Balance = Balance; fn polynomial() -> frame_support::weights::WeightToFeeCoefficients { - let p = MILLI_CTC / 2; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + let p = CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec::smallvec![WeightToFeeCoefficient { degree: 1, negative: false, @@ -352,8 +352,11 @@ impl WeightToFeePolynomial for WeightToCtcFee { } } +pub const TRANSACTION_BYTE_FEE: Balance = 10 * CENTS / 1_000; + parameter_types! { pub FeeMultiplier: Multiplier = Multiplier::one(); + pub const TransactionByteFee: Balance = TRANSACTION_BYTE_FEE; } impl pallet_transaction_payment::Config for Runtime { @@ -361,7 +364,7 @@ impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = CurrencyAdapter; type OperationalFeeMultiplier = ConstU8<1u8>; type WeightToFee = WeightToCtcFee; - type LengthToFee = ConstantMultiplier>; + type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = ConstFeeMultiplier; } diff --git a/runtime/src/version.rs b/runtime/src/version.rs index 67ebe335..9ce651f3 100644 --- a/runtime/src/version.rs +++ b/runtime/src/version.rs @@ -7,7 +7,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("creditcoin3"), impl_name: create_runtime_str!("creditcoin3"), authoring_version: 3, - spec_version: 38, + spec_version: 39, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, From e5e094cc67f7201f7764a952cbc25f45c3dee27e Mon Sep 17 00:00:00 2001 From: rustlang-dev Date: Fri, 15 Nov 2024 16:36:58 +0000 Subject: [PATCH 2/3] fix clippy --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 7ed443a4..461ff812 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -39,7 +39,7 @@ use frame_support::weights::{constants::ParityDbWeight as RuntimeDbWeight, Weigh use frame_support::{ construct_runtime, parameter_types, traits::{ - ConstU128, ConstU32, ConstU8, FindAuthor, InstanceFilter, KeyOwnerProofSystem, OnFinalize, + ConstU32, ConstU8, FindAuthor, InstanceFilter, KeyOwnerProofSystem, OnFinalize, OnTimestampSet, }, weights::{ From a326c6687d46a29b69e5f37c97f2e4f2ddfe602e Mon Sep 17 00:00:00 2001 From: rustlang-dev Date: Fri, 15 Nov 2024 18:35:25 +0000 Subject: [PATCH 3/3] cargo toml to v 39 --- Cargo.lock | 28 ++++++++++++++-------------- Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index caec6848..b57743e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "creditcoin3-cli-opt" -version = "3.38.0" +version = "3.39.0" dependencies = [ "bip32", "clap", @@ -1535,7 +1535,7 @@ dependencies = [ [[package]] name = "creditcoin3-client-evm-tracing" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-rpc-primitives-debug", "ethereum-types", @@ -1551,7 +1551,7 @@ dependencies = [ [[package]] name = "creditcoin3-evm-tracer" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-primitives-ext", "ethereum-types", @@ -1571,7 +1571,7 @@ dependencies = [ [[package]] name = "creditcoin3-node" -version = "3.38.0" +version = "3.39.0" dependencies = [ "async-trait", "clap", @@ -1648,7 +1648,7 @@ dependencies = [ [[package]] name = "creditcoin3-primitives-ext" -version = "3.38.0" +version = "3.39.0" dependencies = [ "ethereum-types", "evm-tracing-events", @@ -1659,7 +1659,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-core-debug" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-client-evm-tracing", "creditcoin3-rpc-core-types", @@ -1673,7 +1673,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-core-trace" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-client-evm-tracing", "creditcoin3-rpc-core-types", @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-core-types" -version = "3.38.0" +version = "3.39.0" dependencies = [ "ethereum-types", "serde", @@ -1695,7 +1695,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-debug" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-client-evm-tracing", "creditcoin3-rpc-core-debug", @@ -1726,7 +1726,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-primitives-debug" -version = "3.38.0" +version = "3.39.0" dependencies = [ "environmental", "ethereum", @@ -1743,7 +1743,7 @@ dependencies = [ [[package]] name = "creditcoin3-rpc-trace" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-client-evm-tracing", "creditcoin3-rpc-core-trace", @@ -1778,7 +1778,7 @@ dependencies = [ [[package]] name = "creditcoin3-runtime" -version = "3.38.0" +version = "3.39.0" dependencies = [ "creditcoin3-evm-tracer", "creditcoin3-rpc-primitives-debug", @@ -2748,7 +2748,7 @@ dependencies = [ [[package]] name = "evm-tracing-events" -version = "3.38.0" +version = "3.39.0" dependencies = [ "environmental", "ethereum", @@ -3726,7 +3726,7 @@ dependencies = [ [[package]] name = "generate-bags" -version = "3.38.0" +version = "3.39.0" dependencies = [ "clap", "creditcoin3-runtime", diff --git a/Cargo.toml b/Cargo.toml index b6daa388..5f51b388 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ resolver = "2" [workspace.package] -version = "3.38.0" +version = "3.39.0" authors = ["Gluwa Inc. Developer Support "] edition = "2021" license = "Unlicense"