Skip to content

Commit

Permalink
Switch to london evm configuration (paritytech#532)
Browse files Browse the repository at this point in the history
* Switch to london evm configuration

* Update descriptions

* Update tests
  • Loading branch information
tgmichel authored Dec 3, 2021
1 parent aa5e518 commit 6df6b1d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/frame/evm.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ any Ethereum transaction into a transaction compatible with this
module.

The gas configurations are configurable. Right now, a pre-defined
Istanbul hard fork configuration option is provided.
London hard fork configuration option is provided.
2 changes: 1 addition & 1 deletion frame/ethereum/src/tests/eip1559.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ fn transaction_should_generate_correct_gas_used() {
let (pairs, mut ext) = new_test_ext(1);
let alice = &pairs[0];

let expected_gas = U256::from(891328);
let expected_gas = U256::from(893928);

ext.execute_with(|| {
let t = eip1559_erc20_creation_transaction(alice);
Expand Down
2 changes: 1 addition & 1 deletion frame/ethereum/src/tests/eip2930.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ fn transaction_should_generate_correct_gas_used() {
let (pairs, mut ext) = new_test_ext(1);
let alice = &pairs[0];

let expected_gas = U256::from(891328);
let expected_gas = U256::from(893928);

ext.execute_with(|| {
let t = eip2930_erc20_creation_transaction(alice);
Expand Down
2 changes: 1 addition & 1 deletion frame/ethereum/src/tests/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ fn transaction_should_generate_correct_gas_used() {
let (pairs, mut ext) = new_test_ext(1);
let alice = &pairs[0];

let expected_gas = U256::from(891328);
let expected_gas = U256::from(893928);

ext.execute_with(|| {
let t = legacy_erc20_creation_transaction(alice);
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Observable differences include:

We currently do not aim to make unobservable behaviors, such as state root, to be the same. We also don't aim to follow the exact same transaction / receipt format. However, given one Ethereum transaction and one Substrate account's private key, one should be able to convert any Ethereum transaction into a transaction compatible with this module.

The gas configurations are configurable. Right now, a pre-defined Istanbul hard fork configuration option is provided.
The gas configurations are configurable. Right now, a pre-defined London hard fork configuration option is provided.

License: Apache-2.0
6 changes: 3 additions & 3 deletions frame/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
//! the exact same transaction / receipt format. However, given one Ethereum transaction and one Substrate account's
//! private key, one should be able to convert any Ethereum transaction into a transaction compatible with this pallet.
//!
//! The gas configurations are configurable. Right now, a pre-defined Istanbul hard fork configuration option is provided.
//! The gas configurations are configurable. Right now, a pre-defined London hard fork configuration option is provided.

// Ensure we're `no_std` when compiling for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
Expand Down Expand Up @@ -145,7 +145,7 @@ pub mod pallet {

/// EVM config used in the module.
fn config() -> &'static EvmConfig {
&ISTANBUL_CONFIG
&LONDON_CONFIG
}
}

Expand Down Expand Up @@ -571,7 +571,7 @@ impl GasWeightMapping for () {
}
}

static ISTANBUL_CONFIG: EvmConfig = EvmConfig::istanbul();
static LONDON_CONFIG: EvmConfig = EvmConfig::london();

#[cfg(feature = "std")]
#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, Serialize, Deserialize)]
Expand Down

0 comments on commit 6df6b1d

Please sign in to comment.