You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Evolve's JSON-RPC layer fully Ethereum-compliant, high-performance, and rigorously tested. The end state: MetaMask and all standard Ethereum wallets/tooling (ethers.js, viem, wagmi, Foundry, Hardhat) work out of the box with zero quirks, and the RPC is never the bottleneck for transaction submission or query throughput.
Receipt: status, cumulativeGasUsed, effectiveGasPrice, type field present
Transaction: v/r/s fields correct, type field present, accessList when applicable
Logs: logIndex, transactionIndex, blockNumber all populated
Error code compliance: Verify JSON-RPC error codes match the spec (-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32000 execution reverted with revert data)
Edge case testing: earliest/latest/pending/safe/finalized block tags, zero address, empty data, max u256 values, nonexistent blocks/txs return null not error
3. Performance Testing & Optimization
Load testing harness: Build or integrate a load testing tool (e.g., custom Rust tool, vegeta, k6) that hammers the RPC with realistic workloads
Throughput benchmarks:
eth_sendRawTransaction submissions/sec (target: RPC should not be the bottleneck — must exceed block gas consumption rate)
Goal
Make Evolve's JSON-RPC layer fully Ethereum-compliant, high-performance, and rigorously tested. The end state: MetaMask and all standard Ethereum wallets/tooling (ethers.js, viem, wagmi, Foundry, Hardhat) work out of the box with zero quirks, and the RPC is never the bottleneck for transaction submission or query throughput.
Current State
eth_chainId,eth_blockNumber,eth_getBalance,eth_getTransactionCount,eth_getBlockByNumber/Hash,eth_getTransactionByHash,eth_getTransactionReceipt,eth_call,eth_estimateGas,eth_gasPrice,eth_sendRawTransaction,eth_getLogs,eth_syncing,eth_protocolVersion,eth_getCode,eth_getStorageAt,eth_feeHistory,eth_maxPriorityFeePerGas,eth_getBlockTransactionCountByNumber/Hash,web3_clientVersion,web3_sha3,net_version,net_listening,net_peerCountnewHeads,logs,newPendingTransactions,syncingvia WebSocketfee_historyreturns zero fees,net_peerCountreturns 0Scope
1. ETH JSON-RPC Compliance — Missing Methods
Methods required by MetaMask and common tooling that are not yet implemented:
eth_accounts— Returns list of addresses owned by client (return empty for non-custodial)eth_sign/eth_signTransaction— Return proper "not supported" errors (MetaMask expects these to exist)eth_getTransactionByBlockHashAndIndex— Required by block explorerseth_getTransactionByBlockNumberAndIndex— Required by block explorerseth_getBlockReceipts— Batch receipt fetching (used by indexers)eth_getUncleCountByBlockHash/eth_getUncleCountByBlockNumber— Return 0 (no uncles, but wallets call these)eth_getUncleByBlockHashAndIndex/eth_getUncleByBlockNumberAndIndex— Return nulleth_newFilter/eth_newBlockFilter/eth_newPendingTransactionFilter/eth_getFilterChanges/eth_getFilterLogs/eth_uninstallFilter— HTTP polling filter API (MetaMask uses these when WebSocket is unavailable)eth_createAccessList— Used by wallets for EIP-2930 tx optimizationeth_getProof— Merkle proof for account/storage (used by bridges and light clients)debug_traceTransaction/debug_traceBlockByNumber— Optional but needed for debugging tooling (Tenderly, Foundry)2. ETH Compliance Correctness Testing
eth_chainIdnet_versioneth_blockNumbereth_getBalanceeth_gasPrice/eth_maxPriorityFeePerGas/eth_feeHistoryeth_getTransactionCount(nonce)eth_estimateGaseth_sendRawTransactioneth_getTransactionReceipt(polling)forge scriptandcastagainst a running Evolve nodebaseFeePerGaspresent,mixHash/noncecorrect defaults,sizenon-zerostatus,cumulativeGasUsed,effectiveGasPrice,typefield presentv/r/sfields correct,typefield present,accessListwhen applicablelogIndex,transactionIndex,blockNumberall populatedearliest/latest/pending/safe/finalizedblock tags, zero address, empty data, max u256 values, nonexistent blocks/txs return null not error3. Performance Testing & Optimization
eth_sendRawTransactionsubmissions/sec (target: RPC should not be the bottleneck — must exceed block gas consumption rate)eth_getBalance/eth_getTransactionCountqueries/sec (read-heavy wallet workload)eth_getBlockByNumberwith full transactions (large response serialization)eth_getLogswith broad filters (index query performance)eth_callexecution (dry-run throughput)newHeadsandlogsunder loadsimd-jsonif it's a bottleneck4. Fee/Gas Correctness
The current
fee_historyand gas-related methods return hardcoded zeros. This breaks wallet UX.eth_feeHistory: Return actual base fee history from indexed blocks (wallets use this to suggest gas prices)eth_gasPrice: Return a meaningful gas price (even if fixed/low, MetaMask uses this to populate the tx form)eth_maxPriorityFeePerGas: Return a sensible default (wallets add this to base fee)eth_estimateGas: Verify accuracy — should return gas that is sufficient but not wildly over-estimatedbaseFeePerGasand receipts includeeffectiveGasPrice5. Subscription Correctness
newHeadsdelivers all blocks: No gaps under high block productionlogsfiltering: Verify address and topic filters match Ethereum semantics exactly (OR within position, AND across positions)newPendingTransactions: Verify hash is emitted when tx enters mempool, not on execution6. RPC Server Hardening
eth_getLogsresult limits: Cap the number of logs returned per query to prevent memory exhaustionSuccess Criteria
cast,forge script) work against Evolve without custom provider configuration.eth_sendRawTransactionthroughput exceeds 10,000 submissions/sec (RPC layer only, excluding STF execution).eth_getBalance,eth_blockNumber) under load is <10ms.