Skip to content

sharding rpc fixes (CON-320)#3548

Merged
pompon0 merged 2 commits into
mainfrom
gprusak-sharding-rpc
Jun 4, 2026
Merged

sharding rpc fixes (CON-320)#3548
pompon0 merged 2 commits into
mainfrom
gprusak-sharding-rpc

Conversation

@pompon0

@pompon0 pompon0 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
  • apparently WS RPC server does not have any timeouts by default, so I have added an explicit timeout for the proxying calls (so that proxy is not waiting forever if server is unresponsive) consistent HTTP RPC server - httpServer.timeouts.WriteTimeout
  • I have removed the error wrapping of proxied rpc calls, because evm server is unable to handle the wrapped errors
  • removed some deadcode

@cursor

cursor Bot commented Jun 4, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes behavior for pending nonce/send and cross-shard proxy paths (timeouts and error shape); low blast radius elsewhere but affects transaction submission and nonce queries.

Overview
Hardens EVM RPC sharding by bounding proxied calls and returning errors the upstream shard can interpret.

Timeouts: HTTP and WebSocket servers now derive a shared methodTimeout from WriteTimeout and pass it into SendAPI / TransactionAPI. eth_sendRawTransaction and pending eth_getTransactionCount wrap the request context with that deadline before dialing the shard proxy.

Proxy errors: Successful proxied CallContext failures are returned without fmt.Errorf wrapping so downstream EVM nodes see the original RPC error.

Cleanup: Removes unused StartHTTPEndpoint, stopWS, and moves CheckTimeouts into NewHTTPServer (duplicate call removed from Start). Minor interface{}any and a TODO on possibly proxying eth_getTransactionByHash for mempool sharding.

Reviewed by Cursor Bugbot for commit c3ef6be. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 4, 2026, 9:38 AM

@pompon0 pompon0 requested review from sei-will and wen-coding June 4, 2026 09:36
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.28%. Comparing base (1a1b8cd) to head (c3ef6be).

Files with missing lines Patch % Lines
evmrpc/send.go 83.33% 1 Missing ⚠️
evmrpc/tx.go 91.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3548      +/-   ##
==========================================
- Coverage   59.12%   58.28%   -0.85%     
==========================================
  Files        2218     2144      -74     
  Lines      183132   174548    -8584     
==========================================
- Hits       108285   101729    -6556     
+ Misses      65082    63757    -1325     
+ Partials     9765     9062     -703     
Flag Coverage Δ
sei-chain-pr 68.33% <92.59%> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

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

Files with missing lines Coverage Δ
evmrpc/endpoints.go 37.50% <ø> (+16.07%) ⬆️
evmrpc/rpcstack.go 78.54% <100.00%> (+1.67%) ⬆️
evmrpc/server.go 88.73% <100.00%> (+0.10%) ⬆️
evmrpc/send.go 51.04% <83.33%> (+1.77%) ⬆️
evmrpc/tx.go 83.48% <91.66%> (+0.25%) ⬆️

... and 74 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.

@pompon0 pompon0 enabled auto-merge June 4, 2026 19:44
@pompon0 pompon0 added this pull request to the merge queue Jun 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 4, 2026
@pompon0 pompon0 added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 400a907 Jun 4, 2026
83 of 87 checks passed
@pompon0 pompon0 deleted the gprusak-sharding-rpc branch June 4, 2026 20:48
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.

2 participants