Skip to content

doc: document public RPC request body size limits#77

Merged
Troublor merged 2 commits into
mainfrom
williamaaroncheung/doc/rpc-body-limits
Jul 8, 2026
Merged

doc: document public RPC request body size limits#77
Troublor merged 2 commits into
mainfrom
williamaaroncheung/doc/rpc-body-limits

Conversation

@Troublor

@Troublor Troublor commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

The public MegaETH RPC endpoint enforces request body size limits that vary by method class, but this behavior was not documented. Developers deploying large contracts could hit an undocumented 413 / -32099 (payload too large) rejection when estimating gas or simulating calls with full-size initcode.

This adds documentation for the three body-size tiers and the associated error:

  • docs/dev/read/overview.md — new Request Body Limits section: 2.5 MiB for transaction submission, 1.5 MiB for large reads/simulations (eth_call, eth_callMany, eth_createAccessList, eth_estimateGas), and 128 KiB for all other methods.
  • docs/dev/read/rpc/error-codes.md — new 413 / -32099 (payload too large) row.
  • docs/dev/send-tx/gas-estimation.md — note that gas estimation for large deployments sends full initcode and is allowed up to the 1.5 MiB large-read limit.

Test plan

  • Verify the three new/updated pages render correctly in GitBook.
  • Confirm internal cross-links and the #request-body-limits anchor resolve (lychee link check in CI).

This PR was generated by an automated agent.

@Troublor Troublor added the agent label Jul 8, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Clean

  • Reviewed the three new/updated pages: docs/dev/read/overview.md, docs/dev/read/rpc/error-codes.md, and docs/dev/send-tx/gas-estimation.md.
  • Frontmatter, sentence-per-line prose, relative .md cross-links, and the #request-body-limits anchor all conform to the layer conventions in docs/AGENTS.md and docs/dev/AGENTS.md.
  • The 1.5 MiB / 128 KiB values appear in both overview.md and gas-estimation.md, but that is consistent with the layer style rule on self-contained pages and the gas-estimation page links back to the canonical table — not flagged as duplication.
  • No new actionable findings. Still open from earlier reviews: none.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧭 Re-review update

  • Reviewed the incremental change since the prior review (commit 045afcc): prettier reformatted table column padding in docs/dev/read/overview.md and docs/dev/read/rpc/error-codes.md. Content, links, and anchors are unchanged.
  • No new actionable findings.
  • Still open from earlier reviews: none.

@Troublor Troublor merged commit 6f41f3c into main Jul 8, 2026
7 checks passed
@Troublor Troublor deleted the williamaaroncheung/doc/rpc-body-limits branch July 8, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant