Skip to content

docs: explicitly distinguish RPC gas cap from protocol transaction gas limits #271

Description

@mssystem1

Summary

Arc's breaking-change documentation describes the --rpc.gascap default being reduced from 50,000,000 to 30,000,000.

The documentation correctly explains that eth_call and eth_estimateGas requests requiring more than the configured cap can fail.

However, it would be useful to explicitly state that the RPC gas cap is an RPC simulation/execution limit and should not automatically be interpreted as the protocol's maximum executable transaction gas limit.

Problem

Developers frequently use eth_estimateGas to determine whether a transaction is executable.

If:

eth_estimateGas -> fails because RPC gas cap was reached

it is easy to incorrectly interpret the result as:

transaction cannot be executed by Arc

Those are not necessarily equivalent conditions.

A node-local RPC limit can reject simulation before the protocol itself would reject the transaction.

Expected Documentation

The breaking-change entry should explicitly explain the distinction.

For example:

Note: --rpc.gascap limits gas available to applicable JSON-RPC
simulation calls. Reaching this limit does not necessarily mean the
corresponding transaction exceeds Arc's protocol-level transaction or
block gas limits.

It would also be useful to document the error returned when this specific limit is reached.

Why This Matters

Libraries and applications often treat gas-estimation failures as transaction failures.

Examples include:

  • ethers
  • viem
  • wagmi
  • Hardhat
  • Foundry scripts
  • wallets
  • account abstraction infrastructure

Without distinguishing a node-local simulation limit from a protocol rejection, developers may unnecessarily modify contracts or assume a transaction is impossible.

Suggested Fix

Document three separate concepts where applicable:

  1. RPC simulation gas cap
  2. maximum transaction gas constraints
  3. block gas constraints

Also document how a developer can recognize the RPC-cap error specifically.

Optional Improvement

Expose enough information in the RPC error to make the condition machine-detectable.

For example, applications should ideally be able to distinguish:
simulation exceeded RPC gas cap

From:
execution reverted

And:
transaction exceeds protocol gas limit

without parsing ambiguous error strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions