Add Test Suite for eth rpc methods - #14
Open
moglu2017 wants to merge 16 commits into
Open
Conversation
…C coverage
- Wire ethersjs (mocha + ethers v6) into `go test ./...` via a thin
RunTestMain-driven wrapper; Makefile guards `npm ci`, workflow adds
setup-node@22 (global WebSocket).
- Add ws subscription schema tests for newHeads / logs /
newPendingTransactions (raw gorilla/websocket) plus a syncing-rejected
pin; ship matching schemas under schemas/.
- Extend ethersjs suite to 68 tests covering getBlock variants and
block tags, JsonRpcSigner gaps, multi-shape eth_getLogs, EIP-1898
block refs, EIP-2930 / eth_blobBaseFee rejections, batched
JsonRpcProvider, CREATE2 parity (new Create2Factory.sol + multi-file
compile script), WebSocketProvider end-to-end (block / pending /
logs / destroy), and method-level Contract estimateGas /
populateTransaction.
- main_test.go now defaults THOR_BRANCH=pedro/eth_eq_json_rpc so the
schema suite runs standalone, mirroring the ethersjs wrapper.
Remove TestWsSubscribeSyncingRejected test case.
Add a viem v2 compatibility suite mirroring ethersjs (provider/wallet/ contract/events/websocket + rpc-extra) and broaden the ethersjs and eth_rpc_schema suites. All suites follow the same three-category scheme: implemented methods asserted fully, unimplemented methods skipped, and divergences (eth_feeHistory rewardPercentiles) skipped until Thor aligns. - viem: new suite + Go wrapper, wired into Makefile (viem-deps) - eth_rpc_schema: schemas + tests for chain stubs, uncles, filter family, WS syncing subscription; skip table for unimplemented methods - ethersjs: block/uncle/index methods, filter family, net/web3 metadata, ENS skips, WS once/syncing
- Prevents concurrent eth_rpc suites from reusing the same funded account's nonce, which caused pending transactions to never be mined and suites to fail with receipt/block timeouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Added a test suite for testing eth RPC methods.
It contains 4 test groups:
eth_rpc_schema — validates the JSON schema of RPC requests and responses.
ethersjs — tests compatibility with ethers.js.
web3js — tests compatibility with web3.js.
viem — tests compatibility with viem.