Skip to main content

EVM Node Settings for RPC Nodes

TL;DR: On ZIGChain v6, a node that serves EVM JSON-RPC needs gRPC enabled. The node also rebroadcasts queued EVM transactions once their nonce gap fills, and EVM and Cosmos queries run under new gas, trace and output limits.

Overview​

These EVM node settings apply to a ZIGChain RPC node, sentry node or archive node that runs zigchaind v6. Validators that do not expose any endpoint can skip this page. v6 adds the EVM, and fixes from the v6 security audit change what a node serves and which app.toml settings it needs. None of these changes is consensus-breaking, because every item is local to the node. The EVM sections of app.toml are described in Set Up a ZIGChain Node.

Keep gRPC Enabled for EVM JSON-RPC​

EVM JSON-RPC methods such as eth_call, eth_estimateGas and debug_trace* reach the EVM through the node's gRPC server. On v6, abci_query on port 26657 no longer serves these queries, because on that path they ran under the CometBFT lock that block processing also takes. Keep gRPC enabled in app.toml. enable = true is the value zigchaind init writes by default:

[grpc]
enable = true

If JSON-RPC is enabled and gRPC is disabled, the node logs the following message at start:

json-rpc is enabled without grpc: eth_call, eth_estimateGas and debug_trace* need grpc.enable = true

Rebroadcast of Promoted EVM Transactions​

An EVM transaction with a nonce gap waits in the node's local queue. Once the gap fills, the node broadcasts the transaction to the network itself. Rebroadcast works only when at least one of api, grpc or json-rpc is enabled, because the node gets its CometBFT client from them. With gRPC enabled by default, this condition normally holds.

These log lines show the rebroadcast state:

LevelMessageMeaning
InfoEVM mempool rebroadcast startedRebroadcast is active.
Warnno CometBFT client, promoted EVM txs stay local; enable api, grpc or json-rpc to rebroadcast themapi, grpc and json-rpc are all disabled, so transactions sent to this node stay local until they expire after 3 hours.
Errorrebroadcast queue full, promoted txs stay localThe rebroadcast queue is full and batches are dropped. The node logs this at most once a minute.

EVM Query Limits on a ZIGChain RPC Node​

These limits apply to EVM queries over gRPC and JSON-RPC:

SettingLimit
Gas cap on eth_call, eth_estimateGas and tracesgas-cap in the [json-rpc] section, 25,000,000 by default. gas-cap is not in the [json-rpc] block in Set Up a ZIGChain Node; add it to change the default. 0 no longer means unlimited.
Trace gasThe larger of the gas cap and the block gas limit (100,000,000 on Mainnet). Each transaction counts as at least 21,000 gas.
Struct logger output16 MiB per request. A trace that is cut short returns ResourceExhausted.
Struct logger debug_traceBlockAt most 64 transactions. Use callTracer for larger blocks.
enableMemory, enableReturnDataRefused for the struct logger.
Trace timeoutAt most 5 seconds.

Cosmos Query Limits​

Two Cosmos query limits change on v6:

  • query-gas-limit: 0 in app.toml now means 50,000,000 gas instead of unlimited. A value you set yourself is kept.
  • abci_query store paths: abci_query serves only /store/<name>/key, which relayers use with proofs. /store/<name>/subspace and other store paths are refused, also when the request is sent through cosmos.base.tendermint.v1beta1.Service/ABCIQuery.