Skip to content

chore: Merge upstream erpc 0.5.0 into main - #7

Merged
shpookas merged 60 commits into
mainfrom
chore/merge-upstream-0.5.0
Nov 4, 2026
Merged

shpookas merged 60 commits into
mainfrom
chore/merge-upstream-0.5.0

Conversation

@shpookas

@shpookas shpookas commented Nov 4, 2026 •

Copy link
Copy Markdown

Merges upstream erpc/erpc release 0.5.0 into main (59 upstream commits). Merge commit, no conflicts.

Fork-only changes kept:

  • Dockerfile Go pin (golang:1.26.10)
  • .github/workflows/ghcr-publish.yml

Builds and validates cleanly.

andreclaro and others added 30 commits October 15, 2026 12:15
The notification empty-body path matched len(replies)==0, which also
covers an empty batch ("[]") where no requests were parsed. That left
EVM clients with a 200 and no body instead of []. Require
len(responses)>0 so only filtered-out notification replies skip the
body; empty batches keep writing [] via the isBatch path.

Co-authored-by: Cursor <cursoragent@cursor.com>
…1265)

feat(evm): poll finalized at a fraction of the finality window [skip ci]

- Finalized moves once per finality window; polling it at the latest cadence returns the same number (~1.0B vendor calls/mo on one fleet set).

- Default 0.05 bounds the added finalized trail to ~5% of the window; 0 restores the old cadence.
…#1268)

fix(metrics): keep metrics server up until http drain completes [skip ci]

- Scrapes during waitBeforeShutdown, drain and waitAfterShutdown now see every increment
Upstream behind the corroborated finalized block samples at the regular debounce until it catches up.
) [skip ci]

fix(clients): send Content-Length with gzipped request bodies [skip ci]

- pooled gzip reader hid the length, so Go sent the body chunked
* fix(evm): classify HyperEVM code=10055 as nonce-too-low

HyperEVM returns JSON-RPC -32100 with message "Unexpected error
(code=10055)" for HyperCore↔HyperEVM boundary failures (nonce,
duplicate hash, insufficient funds, underpriced). Match the message
token and treat as NonceTooLow so eth_sendRawTransaction verifies via
eth_getTransactionByHash instead of failing over to
ErrUpstreamsExhausted or returning blind already-known success.

* fix(evm): scope HyperEVM code=10055 to eth_sendRawTransaction

The message is too broad to reinterpret as NonceTooLow on other methods,
which would stop failover. Match only when the request method is
eth_sendRawTransaction.
…k head (erpc#1274)

- Untranslated "latest" let a lagging upstream answer at its own older head; given a number it lacks, it fails as missing data and the next one answers.
- The body pin rides the attempt ctx bound to its request, so cache key, response binding and other upstreams keep "latest".
…rning out of gas (erpc#1177)

HyperEVM nodes that hold HyperCore state only for their live tip answer
read-precompile calls at older blocks with -32003 "out of gas: gas
exhausted during precompiled contract execution: <gas cap>". Another node
answers the same call, so classify that wording as ErrEndpointMissingData
before the generic out-of-gas branch. Plain out of gas and
eth_sendRawTransaction keep their existing classification.

Fixes erpc#1176
- EvmRefreshLatestBlock was added to EvmNetwork; the fake lost the interface and the leader resolved to nil.
…anic (erpc#1277)

- senderRecovery passed ChainId()=0 of unprotected legacy txs to geth's chain-id signer, which panics; use HomesteadSigner instead.
- Check runs and hedge attempt goroutines now recover panics, so one bad response cannot kill the process.
erpc#1282)

Probe responses never move a head; only the state poller and real traffic do, so lag probes re-admit nothing and bill vendors.
…c#1284)

- Eval runs inline; past evalTimeout it warns, counts kind=timeout, and applies the result
…rpc#1273)

- Served-tip gauges, advance age and guard memory stay current at any traffic
…1245)

getFailsafeExecutor selects policies by method and finality, but IsDown
built a synthetic request with unknown finality. A fallback with an open
finalized/realtime breaker was reported healthy and selected by the
escape path, then immediately hit that breaker. Thread the request
finality through GetFallbackEscapeUpstreams and IsDown.
…pc#1267)

Stamp a closed reason on NewErrAuthUnauthorized and meter once when
ErrAuthUnauthorized is returned to the client (HTTP/gRPC).
…rpc#1287)

* fix(websocket): treat root-path Upgrade as WebSocket, not healthcheck

parseUrlPath classified any non-POST/OPTIONS request to the bare root path
("/" or "") as a healthcheck without checking for a WebSocket upgrade. The
explicit-path tail already guarded on Upgrade, but the empty-path branch did
not, and since the tail only ever *sets* isHealthCheck it could not undo the
misclassification. Because the handler dispatches healthchecks before the WS
upgrade, a `wss://host/` connect (common behind a domain alias) was
served as health and never reached the WS dispatch.

Guard the empty-path branch on the WebSocket upgrade check. Add a test that
a GET+Upgrade to the bare aliased "/" completes the handshake.

* test(websocket): cover WS upgrade through gzip

* fix(common): classify ErrNotImplemented as non-retryable

ErrNotImplemented is returned pre-forward for methods the network cannot
serve in its current configuration — a stateful method (eth_getFilterChanges,
eth_newFilter, ...) under multiple upstreams, or eth_accounts/eth_sign. It
was missing from the IsRetryableTowardsUpstream no-retry list, so it defaulted
to retryable and ClassifySeverity marked it critical, paging on a deterministic
client/config condition no retry or operator action can fix.

Add ErrCodeNotImplemented (previously a bare string literal) to the no-retry
list so it classifies as warning instead of the critical fall-through.

* fix(common): map ErrNotImplemented to -32601

eRPC classifies filter lifecycle methods as stateful and rejects them
under a multi-upstream pool with ErrNotImplemented. But
TranslateToJsonRpcException never handled that code, so it fell through
to the generic -32603 server-side exception. Clients read -32603 as a
transient fault: ethers only downgrades eth_getFilterChanges to polling
when the error classifies as UNSUPPORTED_OPERATION (-32601, or a "not
found|supported" message), so a -32603 leaves it re-arming the same
filter call on every new block forever. One indexer sat 29 hours
behind before its developer noticed.

Map ErrNotImplemented to -32601, preserving the descriptive reason (also
corrects eth_accounts/eth_sign). This aligns the stateful-method
rejection with eRPC's "method not available" family, which already
returns -32601 (ErrEndpointUnsupported, ErrUpstreamMethodIgnored, gRPC
Unimplemented, BDS UNSUPPORTED_METHOD). Update the errors reference row,
which contradicted the doc's own canonical-code table.

* fix(erpc): reject eth_subscribe over HTTP

Subscriptions are served only on the WebSocket path (handleWebSocket,
which returns before the HTTP request loop), because notifications need a
client connection to go to. Over HTTP, eth_subscribe and eth_unsubscribe
were treated as ordinary methods: WebSocket upstreams skip them (only the
subscription owner may send them), so the request swept the HTTP
upstreams and came back as whatever they answered, typically a -32603
ErrUpstreamsExhausted that reads as a transient server fault and invites
retries.

Reject subscription methods on the HTTP inbound path before forwarding,
with ErrNotImplemented (-32601) and a message pointing at WebSocket,
mirroring how a transport-separating node (reth/jsonrpsee) behaves. No
upstream is touched. The WS path is unaffected.

* fix(common): classify ErrSubscriptionNotFound as a client error

eth_unsubscribe for an already-gone or unknown subscription surfaced as
ErrSubscriptionNotFound, which — absent from IsClientError and the no-retry
list — fell through ClassifySeverity to critical and paged on routine WS
unsubscribe churn (observed ~100/day in production). It is a benign client
condition (JSON-RPC convention is to return false, not an error), so add
ErrCodeSubscriptionNotFound to IsClientError → info severity. Test:
TestClassifySeverity_SubscriptionNotFound.

* fix(common): grade sub limit as client error -32005

Exceeding server.webSocket.maxSubscriptionsPerConnection was not in
IsClientError and defaulted to retryable, so ClassifySeverity graded it
critical, and TranslateToJsonRpcException had no mapping for it, so the
client got -32603 internal error.

It is a client condition the caller can resolve by unsubscribing: treat
it as a client error (info severity) and map it to -32005 capacity
exceeded with the error's own message.

* feat(websocket): add global and per-IP caps

Add instance-wide limits for client WebSocket load, all defaulting to 0
(unlimited) and validated non-negative:
- server.webSocket.maxConnections: total client connections
- server.webSocket.maxConnectionsPerIP: connections per resolved client IP
- server.webSocket.maxSubscriptions: total client subscriptions

Connection caps are checked before the upgrade, so a refused client gets
a plain HTTP 429; slots are held for the connection's lifetime and per-IP
entries are deleted at zero. The subscription cap fails fast like the
per-connection cap, then reserves a slot atomically before AddSubscription
and gives it back on unsubscribe or cleanup, so it is exact under
concurrency. Refusals count in erpc_websocket_rejected_total{project,
reason=conn_global|conn_per_ip|sub_global}.

* fix(wsupstream): stop retrying unsupported newHeads

An upstream that rejects eth_subscribe newHeads as unsupported
(normalized to ErrEndpointUnsupported) was retried forever with 1s-30s
backoff: a warn log, a forwarded request, a rate-limit token and an
upstream failure sample every 30s per upstream, and resubDone never set.

Retrying cannot change a deterministic "unsupported" answer, so stop
retrying newHeads for the rest of this resubscribe pass and let filters
settle. The state poller still tracks the head, and the next connection
or resubscribe pass asks again. Every other error keeps retrying.

* fix(wsupstream): reconnect silent newHeads subscription

A node can stop delivering notifications on a newHeads subscription
while the socket stays healthy: pings keep the read deadline fresh and
the adapter keeps heads.id set, so it never resubscribes. That instance
then gets no heads until restart, and because HeadsLive() still reports
true, the fallback tier's heads stay held back too.

Watch for it with a signal observable from the same upstream rather than
a block-time threshold: reconnect when, between two ticks, the same
subscription (id and epoch) delivered nothing although the upstream's
own state poller already reported a newer block than the last pushed
head when the interval began. A halted chain or a lagging node advances
neither number, so neither trips it.

Reconnect (new WsJsonRpcClient.Reconnect, epoch-guarded) rather than
resubscribing on the same socket: a fresh connection is what has been
observed to clear the condition.

The watch loop ends with the upstream client (WsJsonRpcClient.Done)
rather than running for the life of the process.

* fix(indexer): keep structured filter subscribe errors

subscribeFilterLocked wrapped upstream errors in fmt.Errorf("filter
subscribe: %w"), and the indexer then joins them. HasErrorCode follows
joins but not single %w wrappers, so the StandardError underneath was
invisible: a rejected logs/pendingTx eth_subscribe graded critical, the
failure metric's error label carried the full verbose message
(unbounded cardinality), and the client got -32603 instead of the
upstream's code (e.g. -32602 for a bad filter).

Return the error unwrapped; everything downstream already handles the
join. The indexer still logs which ingress failed.

* fix(websocket): unsubscribe directly when release fails

release() forwards eth_unsubscribe through the upstream (rate limits,
timeouts) and ignored the error. When that forward fails before reaching
the wire, a busy subscription is still cancelled by the client's orphan
path on its next notification, but a quiet one (rare log filter, pending
txs on a quiet chain) stays open on the node, holding a per-connection
slot until the next reconnect.

On a failed release, fall back to the client's existing epoch-guarded,
fire-and-forget orphan unsubscribe (now exported as UnsubscribeOrphan).
No-op once the connection is gone.

* fix(evm): classify subscription cap as capacity exceeded

A jsonrpsee -32006 "Too many subscriptions" reply means the node's
per-connection eth_subscribe cap is full. It normalized to
ServerSideException, so the health tracker counted it toward the
upstream's error rate and selectionPolicy could exclude a healthy node.
CapacityExceeded is already exempt and tracked as throttling.

* test(upstream): pin internal requests skipping the breaker

The wsupstream adapter marks its subscription RPCs internal so node-side
subscription caps and transient failures cannot open the upstream
breaker. Pin that a failing internal request leaves the breaker closed
while the same failure from a client request opens it.

* feat(indexer): count withheld and undelivered events

The subscription indexer counts duplicates (subscription_dedup_dropped_total)
but not the other ways an upstream event fails to reach a client, and nothing
shows when the newHeads stream last moved. Add, through NetworkHandle like
the dedup metrics:

- erpc_subscription_withheld_heads_total{project,network}: heads the network
  did not accept (SuggestLatestBlock returned false), e.g. a tier:fallback
  head while a primary streams heads.
- erpc_subscription_undelivered_total{project,network,kind}: events that
  passed dedup but matched no client subscription. Sustained growth on logs
  or newPendingTransactions means upstream subscriptions nobody consumes.
- erpc_network_subscription_last_head_timestamp_seconds{project,network}:
  set when a new head passes dedup, so time() minus it past the block time
  flags a stalled newHeads stream.

* feat(wsupstream): count newHeads stall reconnects

The silent-newHeads watchdog only logged a warning when it forced a
reconnect, so a silent subscription was not alertable.
Count each forced reconnect in
erpc_upstream_websocket_heads_stall_reconnects_total{project,network,
upstream}; any increase means a node dropped a live subscription
without closing it.

* feat(server): proactively prewarm upstream newHeads subscriptions

The upstream newHeads subscription was bootstrapped lazily, only on the first
client eth_subscribe. An instance that never received a client subscription never
established it, so the EVM state poller fell back to RPC-polling the latest
block every cycle instead of consuming pushed heads — multiplying upstream
request volume across instances that happened to differ only in whether a client
had ever subscribed.

Add a background reconciler (PrewarmUpstreamSubscriptions) that bootstraps
newHeads for every WS-capable network at startup, without waiting for a client.
It reconciles because networks initialize asynchronously; bootstrapNetwork is
idempotent, so re-scans are cheap. HTTP-only networks are skipped permanently
(the state poller handles their head tracking via polling). Reconnect
durability was already handled by the adapter's resubscribe-on-reconnect hook;
this only closes the cold never-subscribed gap. Prewarm is a no-op while the
WebSocket server is disabled, since nothing would consume the subscriptions.
Opt-in upstreams[*].evm.multicall3: packs same-block eth_calls into one aggregate3 call; any call the pack cannot answer exactly is sent alone. Supersedes erpc#705.

Co-authored-by: Florian <florian.pautot@gmail.com>
…1291)

go1.27's x/net ClientConn wraps net/http's HTTP/2 client and never sets State().Closing on a received GOAWAY (golang/go#82365).
…rpc#1292)

- Unmarshal into &aux let sonic nil the aux pointer on `null`
- The per-request handler recovered and leaked the stack in -32603
…c#1286)

The post-reconfirm runCheck discarded the panicked flag. A nil verdict after
a panic was counted as reconfirmed, so integrity metrics treated an incomplete
verification as successful reorg recovery. Handle panicked like the initial
invocation and cover the path with a regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Upstreams often reject it; routing it made one upstream a single point of failure for a constant
- erpc#1287 prewarms newHeads with no client subscribed; every pushed head lifted
  the delivered-head floor, so latest outran the polled upstreams and their
  blockAvailability upper bound skipped them as ErrUpstreamBlockUnavailable
- many clients send from: 0x0, the sender a node assumes when none is given
- packs are keyed by sender and sent from it, so tx.origin stays exact
WithEndpoint takes host:port; the documented http://host:port form and the HTTP default produced an unparsable export URL, so no spans left.
kasrakhosravi and others added 27 commits October 21, 2026 19:25
- Dev tools and entry points; no unit-testable logic for library users.
…c#1305)

* test(thirdparty): superchain spec parsing and registry discovery

* test(thirdparty): conduit network discovery and error mapping

* test(thirdparty): repository endpoint discovery and configs

* test(thirdparty): quicknode endpoint pagination and lifecycle

* test(thirdparty): chainstack node paging and chain id probes

* test(thirdparty): static vendor urls, support and error codes

* test(thirdparty): probe vendors, registries and remote cache

* test(thirdparty): wait for primed refresh to land, not freshness
…erpc#1306)

* test(common): validate rejects each invalid config class

* test(common): error codes, unwrap chains, JSON and gRPC mapping

* test(common): defaults outcomes, precedence and config helpers

* test(common): JSON-RPC request/response parse and marshal edges

* test(common): tracing, object mapping, matchers and small helpers
…#1307)

* test(data): postgres connector CRUD, list, watch and reconnect paths

* test(data): redis connector TTL, reverse index, lock, pubsub, TLS

* test(data): dynamodb connector get/list/lock/watch and init errors

* test(data): grpc connector probe, head poll, bootstrap and misses
…ter (erpc#1308)

* test(evm): keep testify mock off request in cache fan-out

* test(evm): re-suggest finalized jump until in-progress lock frees

* test(svm): wait for async floor fetch and widen traffic gate window

* test(evm): map vendor JSON-RPC errors to normalized erpc errors

* test(evm): cover integrity checks, chain view and state probe

* test(evm): cover trace_filter params and block ref extraction

* test(svm): cover cache, hooks, poller, floor and slot lag paths

* test(evm): cover state poller latest/finalized updates and failures

* test(evm): cover cache get/set finality, empty and block-ref paths

* test(evm): cover getLogs splitting, multicall3 and hook dispatch
erpc#1309)

* test(auth): cover strategies, authorizer budgets, payload parsing

* test(util): cover DSL cache, OpenAI client retries and parsing

* test(util): cover headers, redact, byte sizes, bounded call, ids

* test(failsafe): cover backoff and breaker state transitions

* test(failsafe): cover hedge limits, loser release and cancellation

* test(policy): cover engine, eval errors, dump and prober paths

* test(clients): BDS method mapping, gRPC status mapping, param errors

* test(clients): HTTP batching, status/body mapping, gzip, proxy

* test(upstream): Forward outcomes, skips, limits, retry, breaker, hedge

* test(upstream): method rules, getters, chainId/genesis checks, bounds

* test(consensus): winner selection across rules and behaviors

* test(consensus): punishment, misbehavior export and policy build
erpc#1310)

* test(erpc): config analyzer findings for upstream probes

* test(erpc): admin API methods via HTTP server

* test(erpc): shadow upstream comparison outcomes

* test(erpc): gRPC server request handling and auth

* test(erpc): http server routing, status and header paths

* test(erpc): network forwarding, lanes and multiplexing paths
Envio HyperRPC now answers 401 without an API token, so the auto-injected
provider only adds failing upstreams to every zero-config chain.
…c#1313)

- Aurora returns -32603 for NEAR-native txs and engine ContractErrors; every node agrees, so retrying only burns attempts.
- 'no state found for block' and 'state at block #N is pruned' came back as -32603 and fell through to a retryable server fault; another archive upstream can serve them.
* feat(TECHOPS-30895): SVM history parity (pool getFirstAvailableBlock, sig-status null continue, sigs-for-address short-page)

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(TECHOPS-30895): serve deepest-history short answers, mark parity verdicts permanent

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(TECHOPS-30895): restore PoolFirstAvailableSlot under floor opt-in

The base branch dropped always-on floor polling; history parity still needs
the pool MIN helper, and e2e fixtures must declare firstAvailableSlotPlus so
floors are observed.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(TECHOPS-30895): drop pool-answered getFirstAvailableBlock hook

Clients do not call getFirstAvailableBlock on the proxy; remove the
pre-forward pool MIN response and never-cache special case. Keep
PoolFirstAvailableSlot for sig-status and sigs-for-address parity.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(svm): skip history parity on consensus participant slots

Incomplete-but-valid sig history answers must stay 200s under failsafe
consensus so participants can agree; MissingData would collapse to an
agreed error with no last-valid-response fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(svm): exclude history-parity sweep from wrong-empty misbehavior

Mark parity-continuation MissingData and skip wrong-empty metrics and
health misbehavior when a shallower upstream returned the same valid page
as the winner. Fix consensus misbehavior test statusCode reuse in loop.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(erpc): LVR fallback only when consensus participants ran

Use ExecState.ConsensusExecuted instead of HasConsensus so
SkipConsensus serial sweeps keep last-valid-response after history
parity exhaust. Regression tests for both sig history methods.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(svm): rename history parity to history sweep

* fix(svm): route history reads by known floor depth

- Probe getBlocksWithLimit(0,1) floor on every SVM upstream; still enforced only via firstAvailableSlotPlus
- Order getSignatureStatuses/getSignaturesForAddress deepest known floor first per tier
- Continue on null/short page only toward a strictly deeper known floor; drop PoolFirstAvailableSlot and unrelated consensus/LVR, cache-doc and test edits

* feat(svm): updateRate on firstAvailableSlotPlus sets floor probe cadence

- Reuses EVM earliestBlockPlus updateRate; unset keeps 30s.

* feat(svm): freeze floor after first probe unless updateRate is set

- Matches EVM earliestBlockPlus updateRate 0; retries 30s until observed.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: kasrakhosravi <kasra@goldsky.com>
…rors (erpc#1325)

- Aurora's tracer answers -32603 StandaloneError(TransactionHashNotFound) for engine system calls it lists but cannot trace; dRPC repeats it. Retried 12x as a server fault.
…on errors (erpc#1329)

- Arbitrum nitro nodes answer eth_estimateGas with -32000 "gas required exceeds
  allowance (N)" (go-ethereum's gas estimator, carried in nitro's fork) when the call
  runs out of gas at the cap, e.g. a sender whose balance buys N gas. It fell through
  to the generic server-side branch, so every upstream was asked and the caller got
  ErrUpstreamsExhausted. Matched in rule 14 beside "out of gas".

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(svm): emit cache set-success metrics

SVM Set never recorded set-success counters/histograms (EVM does), so Solana
cache-set panels stayed empty. Emit per-connector success total/duration and
sync never-cache docs with finality.go. Leave neverCacheMethods silent and do
not add a reason label on skipped metrics.

* fix(svm): record cache set-error latency like EVM

EVM observes erpc_cache_set_error_duration_seconds on a failed Set; SVM only counted the error, so the Cache Set Latency (Error) panel stayed empty for Solana.

---------

Co-authored-by: kasrakhosravi <kasra@goldsky.com>
…c#1290)

* fix(ratelimit): let store.onFailure decide requests redis cannot

- One DoLimit per request: N rules took N admission slots and N round trips.
- onFailure allow|deny|local; allow keeps today's fail-open.
- Lock the jitter rand shared by concurrent redis DoLimit calls (race).

* style: gofmt ratelimiter_budget.go

* test(ratelimit): onFailure decides through EVM and SVM network forward

* test(ratelimit): onFailure across store states, levels, EVM and SVM

* feat(ratelimit): deny cached over-limit keys without a Redis call

* docs(ratelimit): over-limit cache skips Redis only when every key is cached

* fix(ratelimit): drop radix implicit pipelining; floor local credit limit at one call

- 5ms window delayed each already-pipelined check (+23ms measured, 4 cmds)
- IAM PipeDo sends one radix.Pipeline per check
- recovery probe waits out every failure reason, not only store_error
…#1330)

- Upstream stays in rotation for other methods; one policy, one slot
- Blocks apply in GetOrdered; a method never loses every upstream
- Blocked upstreams are probe candidates for that method
…m gRPC BDS (erpc#1340)

- Each answers only what Agave would return; anything else falls through to the next upstream
- Old slots render blockTime/blockHeight null as Agave history does
Bumps [next](https://github.com/vercel/next.js) from 15.5.25 to 15.5.28.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](vercel/next.js@v15.5.25...v15.5.28)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.28
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
docs(server): describe cumulative gzip threshold, close erpc#990

The conditionalGzipWriter has decided on cumulative body size since erpc#1010,
but server.mdx still documented the first-write-only rule that erpc#990 reported.
Rewrite the gzip paragraph, the threshold default and footgun 22 to match.

Closes erpc#990
erpc#1342)

* fix(erpc): count wrong-empty only if the upstream's head had the block

* fix(erpc): an unknown upstream head still counts a wrong-empty
…rpc#1344)

* fix(monitoring): exclude +Inf bucket from dashboard histogram_quantile queries

When _bucket series are summed across instances by a backend that
aggregates each le series independently, +Inf can exceed the top finite
bucket by more than 1-q, pinning the quantile to the top bucket bound.

* fix(monitoring): keep +Inf in timeout and getLogs-range quantiles

These metrics really exceed their top finite bucket (3.0% above 30 s,
1.6% above 30000 blocks over 24 h), so dropping +Inf would hide real data.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
File Lines Key changes Risk
🔴 networks.go +448/-688 servedTipLane, anchor, tipVoterRank, ... ⚠ 2 concurrency, 1 error paths
🔴 slot.go +37/-23 — ⚠ 2 concurrency, 3 error paths
🔴 init.go +22/-18 — ⚠ 2 concurrency, 2 error paths
🔴 adapter.go +75/-15 watchHeads ⚠ 1 concurrency, 1 error paths
🔴 multicall3.go +515/-0 Multicall3Batcher, multicall3Batch, multicall3Entry, ... ⚠ +3 primitives
🔴 served_tip.go +0/-755 — ⚠ +1 primitives
🔴 ratelimiter_budget.go +204/-240 buildLimitRequest, scaledLimits, overLimitIndex, ... ⚠ +2 primitives
🔴 testing_tcp.go +66/-0 SlowTCPProxy, NewSlowTCPProxy, Addr, ... ⚠ +2 primitives
🔴 ws_json_rpc_client.go +21/-6 Done, Reconnect, UnsubscribeOrphan ⚠ +2 primitives
🔴 ws_conn_limiter.go +72/-0 wsConnLimiter, newWsConnLimiter, acquire, ... ⚠ +1 primitives
🔴 evm_state_poller.go +56/-2 resolveFinalizedDebounce, RefreshLatestBlock ⚠ +1 primitives
🔴 networks_served_tip_refresh.go +42/-0 startServedTipRefresh ⚠ +1 primitives
🔴 networks_registry.go +2/-1 — ⚠ +1 primitives
🟠 grpc_bds_svm.go +381/-0 svmUnservable, svmParams, svmConfigObject, ... ⚠ ErrEndpointUnsupported
🟠 errors.go +64/-12 WithHistorySweepContinuation, IsHistorySweepContinuation ⚠ ErrAuthUnauthorized, ErrNotImplemented
🟠 history_sweep.go +261/-0 upstreamPostForward_historySweep, optionsObjectAt, signatureStatusesNullToMissingData, ... ⚠ ErrEndpointMissingData, ErrJsonRpcExceptionInternal
🟠 error_normalizer.go +101/-0 — ⚠ ErrEndpointCapacityExceeded, ErrJsonRpcExceptionInternal
🟠 subscription_manager.go +59/-9 reserveSub, HeadIndexed, Undelivered, ... ⚠ ErrInstanceSubscriptionLimitExceeded
🟠 auth_metrics.go +54/-0 RecordAuthFailed, authFailureLabels ⚠ ErrAuthUnauthorized, ErrCodeAuthUnauthorized
🟠 strategy_database.go +9/-43 — ⚠ ErrAuthUnauthorized
🟠 json_rpc.go +35/-1 — ⚠ ErrCodeSubscriptionLimitExceeded, ErrJsonRpcExceptionInternal
🟠 grpc_server.go +4/-1 — ⚠ ErrCodeAuthUnauthorized, ErrCodeEndpointUnauthorized
🟠 http_server.go +96/-3 PrewarmUpstreamSubscriptions ⚠ ErrNotImplemented, ErrCodeNoWsUpstreamAvailable
🟠 registry.go +4/-4 — ⚠ ErrAuthUnauthorized
🟠 strategy_jwt.go +7/-7 — ⚠ ErrAuthUnauthorized
🟠 strategy_network.go +3/-3 — ⚠ ErrAuthUnauthorized
🟠 strategy_secret.go +1/-1 — ⚠ ErrAuthUnauthorized
🟠 strategy_siwe.go +5/-5 — ⚠ ErrAuthUnauthorized
🟠 errors.go +0/-4 — ⚠ error path changes
🟠 hedge.go +12/-1 — ⚠ = fmt.Errorf
🔵 tracker.go +478/-110 SetClockForTest, headReporter, addHeadReporter, ...
🔵 served_tip.go +119/-71 Of, parseServedTipQuorum, MarshalYAML, ...
🔵 architecture_svm.go +42/-0 SvmHistory, RecordsBlockTime, RecordsBlockHeight, ...
🟢 evm_local_answers.go +129/-0 LocalAnswerMethods, LocalAnswer, lookupLocalAnswer, ...
🔵 request.go +54/-0 wireParamsContextKey, wireParams, WithWireParams, ...
🟢 pin_latest.go +120/-0 LatestTagParamIndex, selectsLatest, PinLatestParams, ...
🔵 eth_chainId.go +0/-178 —
🔵 integrity_stateprobe.go +109/-28 probeLatest, latestReachesUpstream, executedBlock, ...
🔵 config.go +120/-79 EvmMulticall3Config, EvmMulticall3Config, ServedTipQuorum
🟢 method_blocks.go +84/-0 methodBlockIndex, newMethodBlockIndex, filter, ...
🔵 svm_state_poller.go +69/-56 recoverPanicValue, floorUpdateRate
🔵 upstream.go +17/-5 IsDown, failsafeExecutorFor
🔵 grpc_bds_client.go +18/-15 svmMapError
🔵 redis_ratelimiter_iam.go +8/-17 ImplicitPipeliningEnabled
🔵 indexer.go +14/-2 fanOut
🔵 eval.go +58/-0 MethodBlock, readMethodBlocks
🔵 registry.go +6/-5 GetFallbackEscapeUpstreams
🔵 engine.go +30/-5 runCheck
🟢 local_answer.go +30/-0 projectPreForward_localAnswer
🔵 network.go +12/-0 EvmRefreshLatestBlock
🔵 tracing_core.go +41/-8 tracingHTTPEndpointOptions
🔵 upstream_fake.go +2/-0 RefreshLatestBlock
🔵 shadow.go +2/-42 —
🔵 engine.go +38/-16 withMethodBlocked
🔵 evm_upstream_ops.go +6/-0 EvmMulticall3Batcher
🔵 test.yml +22/-1 —
🔵 eth_blockNumber.go +26/-47 —
🔵 defaults.go +43/-39 —
🔵 validation.go +44/-19 —
🟢 erpc-vs-drpc-nodecore.mdx +92/-0 —
🟢 erpc-vs-dshackle.mdx +97/-0 —
🟢 erpc-vs-web3-proxy.mdx +88/-0 —
🔵 networks.mdx +32/-28 —
🔵 selection-policies.mdx +34/-13 —
🔵 rate-limiters.mdx +40/-25 —
🔵 free.mdx +26/-53 —
🔵 block-tracking.mdx +126/-83 —
🔵 method-handlers.mdx +27/-15 —
🔵 lanes.mdx +36/-46 —
🔵 pnpm-lock.yaml +69/-74 —
🔵 stdlib.js +49/-0 —
🔵 erpc.json +34/-34 —
🔵 metrics.go +99/-51 —
🔵 generated.d.ts +236/-81 —
🔵 generated.ts +159/-82 —
🔵 ratelimiter_registry.go +36/-18 —
160 test files +40336

xray — see through AI slop with deterministic architecture PR diff reviews

@shpookas
shpookas merged commit f97c9f6 into main Nov 4, 2026
3 of 4 checks passed

This branch was previously deployed

1 inactive deployment
xray — 3beed351 Deployed Nov 4, 2026 by shpookas via xray #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants