Skip to content

test: add EIP-170 contract code size limit tests#2312

Merged
rakita merged 2 commits intobluealloy:mainfrom
jackwener:check_len
Mar 27, 2025
Merged

test: add EIP-170 contract code size limit tests#2312
rakita merged 2 commits intobluealloy:mainfrom
jackwener:check_len

Conversation

@jackwener
Copy link
Contributor

@jackwener jackwener commented Mar 26, 2025

  • Refactored the test_eip3860_initcode_size_limit test by extracting the contract deployment logic into a new helper function deploy_contract.
  • Added new tests for EIP-3860 to verify both failure and success scenarios when the contract size exceeds or meets the MAX_INITCODE_SIZE.
  • Added new tests for EIP-170 to verify both failure and success scenarios when the contract size exceeds or meets the limit of 0x6000 bytes.
  • Added tests for EIP-170 to verify the behavior of the CREATE opcode when creating sub-contracts from a factory contract, including both failure and success scenarios.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 26, 2025

CodSpeed Performance Report

Merging #2312 will not alter performance

Comparing jackwener:check_len (fbaaf8f) with main (6f38322)

Summary

✅ 8 untouched benchmarks

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, those cases are covered by eest and ethereum/tests statetests. But those are good tests let us merge them.

@rakita rakita merged commit 214e93c into bluealloy:main Mar 27, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants