diff --git a/Cargo.lock b/Cargo.lock index 6e9e6cf1..80bea8b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1350,7 +1350,6 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", - "pallet-base-fee", "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", @@ -2509,7 +2508,6 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", - "pallet-base-fee", "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", @@ -6239,21 +6237,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-base-fee" -version = "1.0.0" -source = "git+https://github.com/darwinia-network/frontier?branch=prepare-polkadot-v0.9.33#e66dc0457406dde585f6189bdcd685776814eb83" -dependencies = [ - "fp-evm", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-runtime", -] - [[package]] name = "pallet-beefy" version = "4.0.0-dev" @@ -7344,7 +7327,6 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", - "pallet-base-fee", "pallet-bridge-dispatch", "pallet-bridge-grandpa", "pallet-bridge-messages", diff --git a/node/src/chain_spec/crab.rs b/node/src/chain_spec/crab.rs index 88eacdf4..fd75137c 100644 --- a/node/src/chain_spec/crab.rs +++ b/node/src/chain_spec/crab.rs @@ -199,7 +199,6 @@ pub fn genesis_config() -> ChainSpec { // EVM stuff. ethereum: Default::default(), evm: Default::default(), - base_fee: Default::default(), // S2S stuff. bridge_polkadot_grandpa: Default::default(), @@ -332,7 +331,6 @@ fn testnet_genesis( ) }, }, - base_fee: Default::default(), // S2S stuff. bridge_polkadot_grandpa: Default::default(), diff --git a/node/src/chain_spec/darwinia.rs b/node/src/chain_spec/darwinia.rs index e8204b74..4bcf03db 100644 --- a/node/src/chain_spec/darwinia.rs +++ b/node/src/chain_spec/darwinia.rs @@ -199,7 +199,6 @@ pub fn genesis_config() -> ChainSpec { // EVM stuff. ethereum: Default::default(), evm: Default::default(), - base_fee: Default::default(), // S2S stuff. bridge_kusama_grandpa: Default::default(), @@ -332,7 +331,6 @@ fn testnet_genesis( ) }, }, - base_fee: Default::default(), // S2S stuff. bridge_kusama_grandpa: Default::default(), diff --git a/node/src/chain_spec/pangolin.rs b/node/src/chain_spec/pangolin.rs index 25d1239b..83e18c29 100644 --- a/node/src/chain_spec/pangolin.rs +++ b/node/src/chain_spec/pangolin.rs @@ -199,7 +199,6 @@ pub fn genesis_config() -> ChainSpec { // EVM stuff. ethereum: Default::default(), evm: Default::default(), - base_fee: Default::default(), } }, Vec::new(), @@ -326,6 +325,5 @@ fn testnet_genesis( ) }, }, - base_fee: Default::default(), } } diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 29f4c602..5c8f1ca2 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -62,7 +62,6 @@ pallet-fee-market = { default-features = false, git = "https://github.com # frontier fp-rpc = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } fp-self-contained = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-ethereum = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } @@ -175,7 +174,6 @@ std = [ # frontier "fp-rpc/std", "fp-self-contained/std", - "pallet-base-fee/std", "pallet-ethereum/std", "pallet-evm/std", "pallet-evm-precompile-blake2/std", @@ -310,7 +308,6 @@ try-runtime = [ "parachain-info/try-runtime", # frontier - "pallet-base-fee/try-runtime", "pallet-ethereum/try-runtime", "pallet-evm/try-runtime", diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index fa3558ab..d91bf044 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -312,7 +312,6 @@ frame_support::construct_runtime! { // EVM stuff. Ethereum: pallet_ethereum = 31, Evm: pallet_evm = 32, - BaseFee: pallet_base_fee = 33, MessageTransact: darwinia_message_transact = 39, // S2S stuff. @@ -618,12 +617,10 @@ sp_api::impl_runtime_apis! { } fn elasticity() -> Option { - Some(BaseFee::elasticity()) + None } - fn gas_limit_multiplier_support() { - todo!() - } + fn gas_limit_multiplier_support() {} } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { diff --git a/runtime/crab/src/pallets/base_fee.rs b/runtime/crab/src/pallets/base_fee.rs deleted file mode 100644 index d1da68d2..00000000 --- a/runtime/crab/src/pallets/base_fee.rs +++ /dev/null @@ -1,47 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Darwinia is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000); - pub DefaultElasticity: Permill = Permill::from_parts(125_000); -} - -pub struct BaseFeeThreshold; -impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { - fn lower() -> Permill { - Permill::zero() - } - - fn ideal() -> Permill { - Permill::from_parts(500_000) - } - - fn upper() -> Permill { - Permill::from_parts(1_000_000) - } -} - -impl pallet_base_fee::Config for Runtime { - type DefaultBaseFeePerGas = DefaultBaseFeePerGas; - type DefaultElasticity = DefaultElasticity; - type RuntimeEvent = RuntimeEvent; - type Threshold = BaseFeeThreshold; -} diff --git a/runtime/crab/src/pallets/mod.rs b/runtime/crab/src/pallets/mod.rs index 8849eddb..894ac1c3 100644 --- a/runtime/crab/src/pallets/mod.rs +++ b/runtime/crab/src/pallets/mod.rs @@ -103,8 +103,6 @@ mod ethereum; mod evm; pub use evm::*; -mod base_fee; - mod message_transact; // S2S stuff. diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index b6265467..4802522f 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -62,7 +62,6 @@ pallet-fee-market = { default-features = false, git = "https://github.com # frontier fp-rpc = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } fp-self-contained = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-ethereum = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } @@ -175,7 +174,6 @@ std = [ # frontier "fp-rpc/std", "fp-self-contained/std", - "pallet-base-fee/std", "pallet-ethereum/std", "pallet-evm/std", "pallet-evm-precompile-blake2/std", @@ -310,7 +308,6 @@ try-runtime = [ "parachain-info/try-runtime", # frontier - "pallet-base-fee/try-runtime", "pallet-ethereum/try-runtime", "pallet-evm/try-runtime", diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index 0884d5a8..8c8c07ac 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -312,7 +312,6 @@ frame_support::construct_runtime! { // EVM stuff. Ethereum: pallet_ethereum = 31, Evm: pallet_evm = 32, - BaseFee: pallet_base_fee = 33, MessageTransact: darwinia_message_transact = 39, // S2S stuff. @@ -618,11 +617,10 @@ sp_api::impl_runtime_apis! { } fn elasticity() -> Option { - Some(BaseFee::elasticity()) + None } fn gas_limit_multiplier_support() { - todo!() } } diff --git a/runtime/darwinia/src/pallets/base_fee.rs b/runtime/darwinia/src/pallets/base_fee.rs deleted file mode 100644 index d1da68d2..00000000 --- a/runtime/darwinia/src/pallets/base_fee.rs +++ /dev/null @@ -1,47 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Darwinia is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000); - pub DefaultElasticity: Permill = Permill::from_parts(125_000); -} - -pub struct BaseFeeThreshold; -impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { - fn lower() -> Permill { - Permill::zero() - } - - fn ideal() -> Permill { - Permill::from_parts(500_000) - } - - fn upper() -> Permill { - Permill::from_parts(1_000_000) - } -} - -impl pallet_base_fee::Config for Runtime { - type DefaultBaseFeePerGas = DefaultBaseFeePerGas; - type DefaultElasticity = DefaultElasticity; - type RuntimeEvent = RuntimeEvent; - type Threshold = BaseFeeThreshold; -} diff --git a/runtime/darwinia/src/pallets/mod.rs b/runtime/darwinia/src/pallets/mod.rs index 8849eddb..894ac1c3 100644 --- a/runtime/darwinia/src/pallets/mod.rs +++ b/runtime/darwinia/src/pallets/mod.rs @@ -103,8 +103,6 @@ mod ethereum; mod evm; pub use evm::*; -mod base_fee; - mod message_transact; // S2S stuff. diff --git a/runtime/pangolin/Cargo.toml b/runtime/pangolin/Cargo.toml index 3dee7331..3586db9a 100644 --- a/runtime/pangolin/Cargo.toml +++ b/runtime/pangolin/Cargo.toml @@ -61,7 +61,6 @@ pallet-fee-market = { default-features = false, git = "https://github.com/d # frontier fp-rpc = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } fp-self-contained = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-ethereum = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm = { default-features = false, features = ["forbid-evm-reentrancy"], git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } pallet-evm-precompile-blake2 = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "prepare-polkadot-v0.9.33" } @@ -173,7 +172,6 @@ std = [ # frontier "fp-rpc/std", "fp-self-contained/std", - "pallet-base-fee/std", "pallet-ethereum/std", "pallet-evm/std", "pallet-evm-precompile-blake2/std", @@ -307,7 +305,6 @@ try-runtime = [ "parachain-info/try-runtime", # frontier - "pallet-base-fee/try-runtime", "pallet-ethereum/try-runtime", "pallet-evm/try-runtime", diff --git a/runtime/pangolin/src/lib.rs b/runtime/pangolin/src/lib.rs index 0a95d999..b0d1f194 100644 --- a/runtime/pangolin/src/lib.rs +++ b/runtime/pangolin/src/lib.rs @@ -309,7 +309,6 @@ frame_support::construct_runtime! { // EVM stuff. Ethereum: pallet_ethereum = 31, Evm: pallet_evm = 32, - BaseFee: pallet_base_fee = 33, MessageTransact: darwinia_message_transact = 39, } } @@ -608,11 +607,10 @@ sp_api::impl_runtime_apis! { } fn elasticity() -> Option { - Some(BaseFee::elasticity()) + None } fn gas_limit_multiplier_support() { - todo!() } } diff --git a/runtime/pangolin/src/pallets/base_fee.rs b/runtime/pangolin/src/pallets/base_fee.rs deleted file mode 100644 index d1da68d2..00000000 --- a/runtime/pangolin/src/pallets/base_fee.rs +++ /dev/null @@ -1,47 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Darwinia is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000); - pub DefaultElasticity: Permill = Permill::from_parts(125_000); -} - -pub struct BaseFeeThreshold; -impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { - fn lower() -> Permill { - Permill::zero() - } - - fn ideal() -> Permill { - Permill::from_parts(500_000) - } - - fn upper() -> Permill { - Permill::from_parts(1_000_000) - } -} - -impl pallet_base_fee::Config for Runtime { - type DefaultBaseFeePerGas = DefaultBaseFeePerGas; - type DefaultElasticity = DefaultElasticity; - type RuntimeEvent = RuntimeEvent; - type Threshold = BaseFeeThreshold; -} diff --git a/runtime/pangolin/src/pallets/mod.rs b/runtime/pangolin/src/pallets/mod.rs index a1a9c569..15db7fd3 100644 --- a/runtime/pangolin/src/pallets/mod.rs +++ b/runtime/pangolin/src/pallets/mod.rs @@ -103,6 +103,4 @@ mod ethereum; mod evm; pub use evm::*; -mod base_fee; - mod message_transact;