feat: jsonrpc architecture for non-EVM (HAProxy) upstreams - #21
Conversation
Passthrough JSON-RPC networks (jsonrpc:<slug>) skip EVM chainId/state poller/hooks while keeping HTTP/WS forwarding and metrics — including forwardedClientId from #20. Point upstreams at HAProxy/direct endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
xray — see through AI slop with deterministic architecture PR diff reviews |
|
Supersedes the separate edge path (now closed):
After #20 + this + image: add |
Chart emits failsafe as a single object, so UnmarshalYAML uses oldNetworkConfig. That struct lacked JsonRpc, so architecture: jsonrpc networks crashed config load (chainlink-erpc CrashLoopBackOff). Co-authored-by: Cursor <cursoragent@cursor.com>
clients/registry only accepted type=evm, so every non-EVM upstream failed with "unsupported upstream type: jsonrpc" and networks never left ErrNetworkInitializing. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Prod finding: running
Root cause: |
|
Superseded by combined PR #24 (rebased onto |
|
Closing in favor of #24. |
Summary
Stacked on #20 (
forwardedClientId+ WS metrics) — does not modify #20.Adds
architecture: jsonrpc/type: jsonrpcso non-EVM chains can sit on erpc with upstreams pointed at HAProxy (or direct node Services), getting:erpc_network_request_received_total) via existing pipeline + feat: path /secret auth + forwardedClientId + WS event metrics #20eth_chainIdprobe, EVM state poller, or EVM method hooksExample (Solana via HAProxy)
Same pattern for starknet/tron/aptos/ton/sui/btc/polkadot (direct ports as needed).
Out of scope
architecture: svm; this is intentionally dumb passthrough)Test plan
go test ./common/ -run TestJsonRpcNetworkIdgo build ./common ./util ./erpc ./upstreamerpc_network_request_received_total{transport=\"http\"}transport=\"ws\"(via feat: path /secret auth + forwardedClientId + WS event metrics #20 path)Made with Cursor