Skip to content

Commit fd7d892

Browse files
committed
Remove obsolete tx gas limit check in favor of the Fusaka protocol tx max gas limit
1 parent 20040d7 commit fd7d892

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

models/errors/errors.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ func NewTxGasPriceTooLowError(gasPrice *big.Int) error {
6666
))
6767
}
6868

69-
func NewTxGasLimitTooHighError(maxGasLimit uint64) error {
70-
return NewInvalidTransactionError(fmt.Errorf(
71-
"tx gas limit exceeds the max value of %d: ",
72-
maxGasLimit,
73-
))
74-
}
75-
7669
func NewRecoverableError(err error) error {
7770
return fmt.Errorf("%w: %w", ErrRecoverable, err)
7871
}

services/requester/requester.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ var (
4141

4242
const minFlowBalance = 2
4343
const blockGasLimit = 120_000_000
44-
const txMaxGasLimit = 50_000_000
4544

4645
// estimateGasErrorRatio is the amount of overestimation eth_estimateGas
4746
// is allowed to produce in order to speed up calculations.
@@ -167,10 +166,6 @@ func (e *EVM) SendRawTransaction(ctx context.Context, data []byte) (common.Hash,
167166
return common.Hash{}, err
168167
}
169168

170-
if tx.Gas() > txMaxGasLimit {
171-
return common.Hash{}, errs.NewTxGasLimitTooHighError(txMaxGasLimit)
172-
}
173-
174169
head := &types.Header{
175170
// `Number` is only useful to detect hard-forks which were
176171
// activated with block numbers. However, Ethereum now

tests/web3js/eth_failure_handling_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ it('should fail when tx gas limit higher than the max value', async () => {
1212
to: receiver.address,
1313
value: 10,
1414
gasPrice: conf.minGasPrice,
15-
gasLimit: 51_000_000, // max tx gas limit is 50_000_000
15+
gasLimit: 51_000_000, // max tx gas limit is 16_777_216 starting from Fusaka
1616
})
1717
} catch (e) {
18-
assert.include(e.message, 'tx gas limit exceeds the max value of 50000000')
18+
assert.include(e.message, 'transaction gas limit too high (cap: 16777216, tx: 51000000)')
1919
return
2020
}
2121

0 commit comments

Comments
 (0)