Skip to content

feat(evm): EVM RPC .io/.iox integration tests (spec fixtures)#2985

Open
mojtaba-esk wants to merge 18 commits intomainfrom
mojtaba/evm-rpc-io-integration-tests
Open

feat(evm): EVM RPC .io/.iox integration tests (spec fixtures)#2985
mojtaba-esk wants to merge 18 commits intomainfrom
mojtaba/evm-rpc-io-integration-tests

Conversation

@mojtaba-esk
Copy link
Contributor

@mojtaba-esk mojtaba-esk commented Feb 26, 2026

Describe your changes and provide context

Summary

This PR proposes to add a runner that executes execution-apis-style .io/.iox fixtures (255 tests) against Sei EVM RPC with spec-only checks. Script seeds block and deploy tx; fixtures use __SEED__ and bindings (${txHash}, ${deployTxHash}).
Also a job ( "EVM RPC .io/.iox (spec fixtures)") is added to integration CI with continue-on-error so PRs can merge while endpoint coverage is incomplete; failures still show in the run.

Why

  • Track JSON-RPC conformance; many tests currently fail (not implemented / behavior differences).
  • Non-blocking CI until endpoints are fixed.

Testing performed to validate your change

See the RPC_IO_README.md file for more details and the latest test run

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 28, 2026, 11:34 AM

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 78.88889% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.19%. Comparing base (1c2910c) to head (60c9125).

Files with missing lines Patch % Lines
integration_test/evm_module/rpc_io_test/io.go 78.88% 30 Missing and 8 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2985      +/-   ##
==========================================
+ Coverage   58.17%   58.19%   +0.02%     
==========================================
  Files        2113     2112       -1     
  Lines      173688   173271     -417     
==========================================
- Hits       101037   100842     -195     
+ Misses      63622    63501     -121     
+ Partials     9029     8928     -101     
Flag Coverage Δ
sei-chain-pr 78.88% <78.88%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
integration_test/evm_module/rpc_io_test/io.go 78.88% <78.88%> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mojtaba-esk mojtaba-esk marked this pull request as ready for review February 27, 2026 10:35
Copy link
Collaborator

@masih masih left a comment

Choose a reason for hiding this comment

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

Awesome! glad to see so many tests. This is going to up our game in terms of EVM API compatibility.

Question: of the 255 tests how many actually pass and what is the plan for those that do not?

@mojtaba-esk
Copy link
Contributor Author

Awesome! glad to see so many tests. This is going to up our game in terms of EVM API compatibility.

Question: of the 255 tests how many actually pass and what is the plan for those that do not?

Thanks. Here is a report on how many tests are used from ETH vanilla, how many modified slightly to match the data (blockhash, tx,...) and how many are actually generated copying the same style: https://github.com/sei-protocol/sei-chain/blob/8da453b5115ada53ffa0c9ece0fd86dc189e72de/integration_test/evm_module/rpc_io_test/RPC_IO_README.md

20 endpoints are not covered by Eth Exec API so we generated tests for them + 18 endpoints which we updated .io files to .iox (extended io) which has more stuff to handle some stateful test cases

@mojtaba-esk mojtaba-esk requested a review from masih February 27, 2026 12:44
Copy link
Collaborator

@masih masih left a comment

Choose a reason for hiding this comment

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

The very beginning of hardened EVM compatible APIs, great work @mojtaba-esk 🚀

continue
}

if inBinding && lastIdx >= 0 && strings.HasPrefix(trimmed, directivePrefix) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small point that parseIOFile doesn't seem to return error for invalid fixture directives. A malformed directive would then result in assertions getting dropped scilently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, correct. nice one. will add some validations to it.


# EVM execution-apis .io is allowed to fail until endpoint coverage is fixed (non-blocking for PR merge)
- name: ${{ matrix.test.name }}
continue-on-error: ${{ matrix.test.name == 'EVM RPC .io/.iox (spec fixtures)' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you had a chance to dig through the ones that are failing to see why? it would be awesome to get them all to pass. Exiting to see so many passing already 🙌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet, but plan to do it.

**Debug one or a few SEED tests:** Run only specific files with extra per-pair logging (request after substitution, bindings, whether `result.transactions` is present):

```bash
SEI_EVM_IO_DEBUG_FILES="debug_getRawTransaction/get-tx.iox" go test ./integration_test/evm_module/rpc_io_test/ -v -run TestEVMRPCSpec
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also mention SEI_EVM_IO_RUN_INTEGRATION=1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, missed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants