Skip to content

Commit 0b6b746

Browse files
authored
Configure EVM transaction max gas limit to 35 million gas (#3734)
* update frontier pin * configure eth tx max gas limit * configure eth tx max gas limit for tests * fix dev tests
1 parent 38bb2c9 commit 0b6b746

35 files changed

Lines changed: 79 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/erc20-xcm-bridge/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ impl pallet_evm::Config for Test {
149149
type Runner = pallet_evm::runner::stack::Runner<Self>;
150150
type ChainId = ();
151151
type BlockGasLimit = BlockGasLimit;
152+
type TransactionGasLimit = ();
152153
type OnChargeTransaction = ();
153154
type FindAuthor = ();
154155
type BlockHashMapping = SubstrateBlockHashMapping<Self>;

pallets/ethereum-xcm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ impl<T: Config> Pallet<T> {
362362
T::ReservedXcmpWeight::get(),
363363
),
364364
),
365+
transaction_gas_limit: <T as pallet_evm::Config>::TransactionGasLimit::get(),
365366
base_fee: U256::zero(),
366367
chain_id: 0u64,
367368
is_transactional: true,

pallets/ethereum-xcm/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ impl pallet_evm::Config for Test {
190190
type Runner = pallet_evm::runner::stack::Runner<Self>;
191191
type ChainId = ChainId;
192192
type BlockGasLimit = BlockGasLimit;
193+
type TransactionGasLimit = ();
193194
type OnChargeTransaction = ();
194195
type FindAuthor = FindAuthorTruncated;
195196
type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;

pallets/moonbeam-foreign-assets/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ impl pallet_evm::Config for Test {
138138
type Runner = pallet_evm::runner::stack::Runner<Self>;
139139
type ChainId = ();
140140
type BlockGasLimit = BlockGasLimit;
141+
type TransactionGasLimit = ();
141142
type OnChargeTransaction = ();
142143
type FindAuthor = ();
143144
type BlockHashMapping = SubstrateBlockHashMapping<Self>;

pallets/moonbeam-lazy-migrations/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ impl pallet_evm::Config for Test {
139139
type ChainId = ();
140140
type OnChargeTransaction = ();
141141
type BlockGasLimit = BlockGasLimit;
142+
type TransactionGasLimit = ();
142143
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping<Self>;
143144
type FindAuthor = ();
144145
type OnCreate = ();

precompiles/author-mapping/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ impl pallet_evm::Config for Runtime {
140140
type ChainId = ();
141141
type OnChargeTransaction = ();
142142
type BlockGasLimit = BlockGasLimit;
143+
type TransactionGasLimit = ();
143144
type BlockHashMapping = SubstrateBlockHashMapping<Self>;
144145
type FindAuthor = ();
145146
type OnCreate = ();

precompiles/balances-erc20/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ impl pallet_evm::Config for Runtime {
141141
type ChainId = ();
142142
type OnChargeTransaction = ();
143143
type BlockGasLimit = BlockGasLimit;
144+
type TransactionGasLimit = ();
144145
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping<Self>;
145146
type FindAuthor = ();
146147
type OnCreate = ();

precompiles/batch/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl pallet_evm::Config for Runtime {
156156
type ChainId = ();
157157
type OnChargeTransaction = ();
158158
type BlockGasLimit = BlockGasLimit;
159+
type TransactionGasLimit = ();
159160
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping<Self>;
160161
type FindAuthor = ();
161162
type OnCreate = ();

precompiles/call-permit/src/mock.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ impl pallet_evm::Config for Runtime {
135135
type ChainId = ();
136136
type OnChargeTransaction = ();
137137
type BlockGasLimit = ();
138+
type TransactionGasLimit = ();
138139
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping<Self>;
139140
type FindAuthor = ();
140141
type OnCreate = ();

0 commit comments

Comments
 (0)