Skip to content

Commit 00ee6dd

Browse files
authored
chore: remove optional_gas_refund as unused (#2132)
* chore: remove unused feature * rm feature
1 parent dd7d751 commit 00ee6dd

File tree

5 files changed

+0
-31
lines changed

5 files changed

+0
-31
lines changed

crates/context/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ dev = [
5757
"optional_balance_check",
5858
"optional_block_gas_limit",
5959
"optional_eip3607",
60-
"optional_gas_refund",
6160
"optional_no_base_fee",
6261
]
6362
memory_limit = []
6463
optional_balance_check = []
6564
optional_block_gas_limit = []
6665
optional_eip3607 = []
67-
optional_gas_refund = []
6866
optional_no_base_fee = []

crates/context/interface/src/cfg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ pub trait Cfg {
2424

2525
fn is_balance_check_disabled(&self) -> bool;
2626

27-
fn is_gas_refund_disabled(&self) -> bool;
28-
2927
fn is_block_gas_limit_disabled(&self) -> bool;
3028

3129
fn is_nonce_check_disabled(&self) -> bool;

crates/context/src/cfg.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ pub struct CfgEnv<SPEC = SpecId> {
5959
/// By default, it is set to `false`.
6060
#[cfg(feature = "optional_eip3607")]
6161
pub disable_eip3607: bool,
62-
/// Disables all gas refunds
63-
///
64-
/// This is useful when using chains that have gas refunds disabled, e.g. Avalanche.
65-
///
66-
/// Reasoning behind removing gas refunds can be found in EIP-3298.
67-
///
68-
/// By default, it is set to `false`.
69-
#[cfg(feature = "optional_gas_refund")]
70-
pub disable_gas_refund: bool,
7162
/// Disables base fee checks for EIP-1559 transactions
7263
///
7364
/// This is useful for testing method calls with zero gas price.
@@ -105,8 +96,6 @@ impl<SPEC> CfgEnv<SPEC> {
10596
disable_block_gas_limit: self.disable_block_gas_limit,
10697
#[cfg(feature = "optional_eip3607")]
10798
disable_eip3607: self.disable_eip3607,
108-
#[cfg(feature = "optional_gas_refund")]
109-
disable_gas_refund: self.disable_gas_refund,
11099
#[cfg(feature = "optional_no_base_fee")]
111100
disable_base_fee: self.disable_base_fee,
112101
}
@@ -168,16 +157,6 @@ impl<SPEC: Into<SpecId> + Copy> Cfg for CfgEnv<SPEC> {
168157
}
169158
}
170159

171-
fn is_gas_refund_disabled(&self) -> bool {
172-
cfg_if::cfg_if! {
173-
if #[cfg(feature = "optional_gas_refund")] {
174-
self.disable_gas_refund
175-
} else {
176-
false
177-
}
178-
}
179-
}
180-
181160
fn is_block_gas_limit_disabled(&self) -> bool {
182161
cfg_if::cfg_if! {
183162
if #[cfg(feature = "optional_block_gas_limit")] {
@@ -219,8 +198,6 @@ impl<SPEC: Default> Default for CfgEnv<SPEC> {
219198
disable_block_gas_limit: false,
220199
#[cfg(feature = "optional_eip3607")]
221200
disable_eip3607: false,
222-
#[cfg(feature = "optional_gas_refund")]
223-
disable_gas_refund: false,
224201
#[cfg(feature = "optional_no_base_fee")]
225202
disable_base_fee: false,
226203
}

crates/optimism/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,12 @@ dev = [
5353
"optional_balance_check",
5454
"optional_block_gas_limit",
5555
"optional_eip3607",
56-
"optional_gas_refund",
5756
"optional_no_base_fee",
5857
]
5958
memory_limit = ["revm/memory_limit"]
6059
optional_balance_check = ["revm/optional_balance_check"]
6160
optional_block_gas_limit = ["revm/optional_block_gas_limit"]
6261
optional_eip3607 = ["revm/optional_eip3607"]
63-
optional_gas_refund = ["revm/optional_gas_refund"]
6462
optional_no_base_fee = ["revm/optional_no_base_fee"]
6563

6664
# See comments in `revm-precompile`

crates/revm/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,12 @@ dev = [
7676
"optional_balance_check",
7777
"optional_block_gas_limit",
7878
"optional_eip3607",
79-
"optional_gas_refund",
8079
"optional_no_base_fee",
8180
]
8281
memory_limit = ["context/memory_limit", "interpreter/memory_limit"]
8382
optional_balance_check = ["context/optional_balance_check"]
8483
optional_block_gas_limit = ["context/optional_block_gas_limit"]
8584
optional_eip3607 = ["context/optional_eip3607"]
86-
optional_gas_refund = ["context/optional_gas_refund"]
8785
optional_no_base_fee = ["context/optional_no_base_fee"]
8886

8987
# See comments in `precompile`

0 commit comments

Comments
 (0)