Skip to Content
EVMRegression Coverage

RPC Regression Coverage

Run these checks whenever you upgrade to a new Sei release or patch your RPC nodes. Each section references recent upstream patches so you know which behaviour to expect.

Gas & Receipts

Targets sei-chain@1efdec1eb and later.
  • Confirm the latest block’s gasUsed equals the sum of all receipt gasUsed values.
  • Sample 20 receipts and ensure none return 0x0 gas for non-legacy heights.
  • Verify eth_estimateGas succeeds for:
    • ERC-20 transfer
    • Pointer association (precompile-pointer:addNativePointer)
    • Solo claim (precompile-solo:claim)

Logs & Filters

  • Query eth_getLogs across a window equal to max_blocks_for_log and confirm the response succeeds without panics.
  • Issue overlapping log filters to ensure the node enforces max_log_no_block and returns partial results rather than failing.
  • Validate eth_newFilter followed by eth_getFilterLogs after replaying 100 blocks.

Websocket Subscriptions

  • Maintain newHeads, logs, and newPendingTransactions subscriptions simultaneously. Watch for disconnects once you reach max_subscriptions_new_head.
  • Ensure heartbeats arrive within the interval defined by your client’s timeout.

Tracing & Panic Handling

  • Execute debug_traceTransaction on a known failing transaction; expect { error: { message, data.trace } } (go-ethereum v1.15.7-sei-6).
  • Run custom tracers with intentionally malformed frames to verify the length guard (go-ethereum v1.15.7-sei-7).
  • Stress test the tracer pool with max_concurrent_trace_calls + 2 parallel requests and verify excess requests queue or fail gracefully.

Sample Scripts

import { JsonRpcProvider } from 'ethers'; const provider = new JsonRpcProvider('http://localhost:8545'); async function verifyBlockGas(blockTag = 'latest') { const block = await provider.send('eth_getBlockByNumber', [blockTag, true]); const receipts = await Promise.all(block.transactions.map((tx) => provider.send('eth_getTransactionReceipt', [tx.hash]))); const sum = receipts.reduce((acc, r) => acc + BigInt(r.gasUsed), 0n); if (sum !== BigInt(block.gasUsed)) { throw new Error(`Mismatch: block=${block.gasUsed} receipts=${sum.toString(16)}`); } } verifyBlockGas().then(() => console.log('Gas totals match.'));
package main import ( "context" "log" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" ) func main() { client, err := ethclient.Dial("ws://localhost:8546") if err != nil { log.Fatal(err) } defer client.Close() headers := make(chan *types.Header) sub, err := client.SubscribeNewHead(context.Background(), headers) if err != nil { log.Fatal(err) } for i := 0; i < 100; i++ { select { case err := <-sub.Err(): log.Fatalf("subscription dropped: %v", err) case header := <-headers: log.Printf("new head: %s", header.Hash()) } } }

Troubleshooting

ErrorCauseFix
Block totals mismatchNode still on pre-`v6.1.11` code or using stale cache.Upgrade to the latest release and restart the RPC service.
Tracer panics terminate connectionRunning go-ethereum < `v1.15.7-sei-6` or custom tracer returns invalid frames.Upgrade to the patched binaries and add frame-length guards to custom tracers.
Subscriptions drop unexpectedlyHitting `max_subscriptions_new_head` or idle timeout.Scale the node horizontally or raise limits in `evm.toml` after sizing hardware.
  • rpc-gas-accounting
  • rpc-gas-reference
  • rpc-panic-faq
  • rpc-websockets
Last updated on