ethereumjs-monorepo
ethereumjs-monorepo copied to clipboard
Implement EIP-7825 for osaka (wip)
Implement EIP-7825: Transaction Gas Limit Cap
Description
This PR implements EIP-7825, which introduces a protocol-level cap on the maximum gas used by a transaction to 30 million gas. This cap is independent of the block gas limit and applies to all transaction types.
Changes
-
Added EIP-7825 parameter in
packages/tx/src/params.ts:- Added
maxTransactionGasLimitparameter set to 30 million gas
- Added
-
Added validation in
packages/tx/src/util/internal.ts:- Added check in
sharedConstructorto validate transaction gas limit against EIP-7825 cap - Throws error if gas limit exceeds 30 million gas when EIP-7825 is activated
- Added check in
-
Added validation in
packages/client/src/service/txpool.ts:- Added check in
validatemethod to ensure transactions don't exceed EIP-7825 gas limit cap - Rejects transactions with gas limit over 30 million when EIP-7825 is activated
- Added check in
TODO:
Tests
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 83.30%. Comparing base (aa039fd) to head (7a0928f).
:warning: Report is 1 commits behind head on master.
Additional details and impacted files
| Flag | Coverage Δ | |
|---|---|---|
| block | 84.33% <ø> (ø) |
|
| blockchain | 89.32% <ø> (ø) |
|
| common | 97.51% <100.00%> (+<0.01%) |
:arrow_up: |
| evm | 72.77% <100.00%> (ø) |
|
| mpt | 89.69% <ø> (+0.25%) |
:arrow_up: |
| statemanager | 69.06% <ø> (ø) |
|
| static | 99.77% <ø> (ø) |
|
| tx | 89.89% <100.00%> (?) |
|
| util | 88.71% <100.00%> (+0.01%) |
:arrow_up: |
| vm | 55.31% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Will pick this up, this is already in good shape!
Current (so pre-PR master) state of Osaka tests failing, total:
1..1100
# tests 1100
# pass 117
# fail 983
When running only the EIP-7825 tests with npm run tester -- --state --fork=Osaka --customTestsPath=../execution-spec-tests/fusaka-devnet-5/state_tests/osaka/eip7825_transaction_gas_limit_cap:
1..31
# tests 31
# pass 21
# fail 10