Skip to content

docs: add complete public RPC reference - #85

Merged
Troublor merged 16 commits into
mainfrom
williamaaroncheung/doc/complete-rpc-reference
Jul 28, 2026
Merged

docs: add complete public RPC reference#85
Troublor merged 16 commits into
mainfrom
williamaaroncheung/doc/complete-rpc-reference

Conversation

@Troublor

@Troublor Troublor commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate and refresh the RPC method references drafted on developer-docs
  • document all 51 methods currently exposed or recognized by the public MegaETH HTTP and WebSocket gateways
  • add shared pages for the quickstart, JSON-RPC framing, wire types, error handling, and public gateway limits
  • organize GitBook navigation as JSON-RPCRPC Reference → individual method pages
  • preserve MegaETH-specific node and gateway behavior instead of reducing the pages to generic Ethereum method definitions
  • expand the Read from MegaETH overview with read patterns, block-tag freshness, public limits, caching, and common tasks
  • update related developer guides, internal links, and legacy GitBook redirects

Documentation structure

  • JSON-RPC is the top-level developer page for shared protocol guidance.
  • RPC Reference is nested beneath it and contains the availability table and all 51 method pages.
  • Individual method files live under docs/dev/rpc/reference/.

Notable corrections

  • eth_subscribe documents all six supported subscription types: newHeads, logs, newPendingTransactions, syncing, miniBlocks, and stateChanges.
  • stateChanges documents that an omitted or empty address list subscribes to all changed accounts.
  • newHeads and miniBlocks include the MegaETH-specific metadata and payload fields implemented by the node.
  • The shared error reference separates HTTP status from JSON-RPC errors and removes unsupported -32019 and -32020 claims.
  • Malformed JSON and unknown methods are documented as JSON-RPC error bodies that can arrive with HTTP 200.
  • Public limits reflect the current gateway implementation, including a 100-item batch limit, method-specific body limits, WebSocket limits, and cache-aware rate accounting.
  • eth_getLogs no longer claims a fixed 100-block public gateway cap on the indexed path.
  • eth_feeHistory, eth_accounts, and eth_maxPriorityFeePerGas document their gateway-synthesized results.
  • eth_call documents its 60,000,000 compute-gas override, while eth_estimateGas documents its separate CPU-time-limited path.
  • eth_sendRawTransactionSync is identified as a gateway compatibility alias rather than a native node method.
  • Output-root and withdrawal-proof pages distinguish gateway aliases from node and OP-node method names.

Validation

  • mise run check-links: 938 links checked, 0 errors
  • mise run check-lint: 108 Markdown files, 0 issues
  • mise run check-format: all Markdown files match the pinned Prettier version
  • git diff --check
  • verified the 51 method pages against the enabled gateway registry, hardcoded handlers, WebSocket controls, and pinned node/gateway source revisions
  • probed safe canonical HTTP and WebSocket requests against the public MegaETH Mainnet endpoint on July 24 and July 27, 2026

Public endpoint verification highlights

Behavior Observed result
eth_feeHistory gateway-synthesized fixed policy values
eth_accounts []
eth_maxPriorityFeePerGas 0x0
eth_getBlockByNumber with pending null
account reads with pending success against streaming state
eth_getWithdrawalProof success
mega_outputAtBlock success; cached projection can omit version
unavailable filter and cursor methods -32601
all six eth_subscribe types subscription established successfully
stateChanges without an address filter subscription established successfully

@Troublor Troublor added the agent label Jul 24, 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.

MegaETH Public RPC Reference — PR Review

Verdict: APPROVE with revisions requested — 1 Major finding, 3 Minor findings, 1 Nit (pre-mortem, unverified). Nothing blocks merging technically, but the Major finding is a silent regression readers will hit before a follow-up ships.

Note: this review is body-only. All findings are consolidated below with file:line references; each was verified against the head tree of this PR.

What is good

  • Comprehensive coverage: a dedicated reference page per method with consistent frontmatter and Parameters / Returns / Errors / Example structure, plus per-error Code | Cause | Fix tables. A clear step up from the prior overview-only doc.
  • Availability probes are dated (2025-11-11 in the intro of docs/dev/read/overview.md) — the right freshness signal.
  • OP-Stack aliasing is called out for mega_getWithdrawalProof / eth_getWithdrawalProof — a good pattern that should be repeated (see Minor #2).
  • Uncle-block behavior on eth_getUncle* is honestly documented (returns null / always 0 on this non-uncle chain) instead of silently omitted.
  • The Cache section on eth_call is candid about staleness and eventual consistency instead of pretending strong read guarantees.
  • The new index docs/dev/read/rpc/README.md gives a clear method → page map and is registered in docs/SUMMARY.md.

Findings

[Major] (pre-mortem, confirmed) docs/dev/read/overview.md:74 — Six filter methods present in the base availability table were silently dropped from the new table: eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterChanges, eth_getFilterLogs. eth_mining was preserved and reclassified to Unavailable, so the omission of the filter set stands out.

The PR description commits to "list gateway-recognized but unavailable methods separately so the public docs do not promise disabled APIs" — but a reader of the base doc who was polling with eth_newFilter + eth_getFilterChanges now cannot tell whether the method was removed from the gateway, whether it still works, or whether the docs are stale. This is a silent regression relative to the prior page.

Please either re-add these six methods as Unavailable rows with the -32601 note (matching the eth_callAfter / eth_getLogsWithCursor pattern already used in this PR), or explicitly note in the page intro that filter-based polling is no longer registered on the public gateway. Verification: probe each of the six method names against https://mainnet.megaeth.com/rpc and record the response.

[Major] docs/dev/send-tx/debugging.md:19 — Not modified by this PR, but this PRs new docs/dev/read/overview.md:38 marks debug_traceCall as Unavailable with -32601, while debugging.md:19 still states debug methods including debug_traceCall are supported on the public MegaETH RPC endpoint. Readers who follow the debugging guide will hit -32601 from the public gateway. Please reconcile — either update debugging.md in this PR to note debug_traceCall is unavailable on the public gateway (mega-evme or a managed provider must be used), or remove the Unavailable classification from overview.md.

[Minor] (pre-mortem, confirmed) docs/dev/read/rpc/eth_sendRawTransactionSync.md and docs/dev/read/rpc/realtime_sendRawTransaction.md — Both methods submit a signed tx, wait for execution, and return a receipt inline; both document the same 5s default and 3000ms public-gateway cap. Yet neither page references the other, and there is no explanation of which name a client should prefer or whether they are aliases. Please add a one-line cross-reference from each page to the other (following the mega_getWithdrawalProof / eth_getWithdrawalProof aliasing pattern already used in this PR) and clarify the relationship — same underlying handler, or two distinct entry points with subtle differences?

[Minor] docs/dev/read/rpc/mega_outputAtBlock.md:92 — The example response mixes what looks like a real captured payload (outputRoot, blockRef.hash, withdrawalStorageRoot, stateRoot all look like real hashes) with obviously synthetic placeholders (parentHash: 0xa1b2c3d4e5f60718293a4b5c6d7e8f900112233... and l1origin.hash: 0x0011223344556677889900aabbccddeeff...). Readers copying this to build test fixtures may not notice which fields are illustrative vs. captured. Either replace all fields with a single consistent captured response for block 0x100, or make every hash obviously synthetic (e.g., all-zeros with a trailing tag).

[Minor] docs/dev/read/rpc/eth_sendRawTransactionSync.md:100 — The example response shows blockHash: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff — an all-1s sentinel that is not standard Ethereum output. If this is a MegaETH-specific sentinel (e.g., "executed in a mini-block that has not yet been committed to a full block hash"), it deserves a one-line note in the Returns table so downstream indexers do not treat it as a real hash. If it is just a placeholder chosen at random, please replace it with a plausible-looking hash to avoid confusion.

Pre-mortem (unverified)

[Nit] lychee.tomlinclude_fragments changed from "full" to true. This looks like a config-syntax normalization, but if lychee treats true as a stricter fragment mode than the previous string value, the next CI run may start flagging fragment links (e.g., page.md anchor references) that previously passed. Please run lychee locally against the current tree with the new value and confirm no previously-passing links now fail; if any do, either fix them in this PR or roll back to the string form.

Verification receipts

  • Confirmed the six dropped filter methods were present in base docs/dev/read/overview.md and are absent from the head version.
  • Confirmed realtime_sendRawTransaction.md and new eth_sendRawTransactionSync.md both document the same 5s default + 3000ms public-gateway cap without cross-referencing each other.
  • Confirmed docs/dev/send-tx/debugging.md:19 was not touched by this PR and still promises debug methods on the public endpoint.

@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 — 3 new findings (pre-mortem)

Reviewed against head SHA b363af0 — unchanged since the prior review. No code has been updated, so every prior finding still stands (recapped below). Three new findings from a fresh pre-mortem pass are added as body-only bullets because the standard pending-review-inline-comment API path was not reachable from this environment on retry — the findings are file:line anchored so they remain actionable.

New pre-mortem findings (confirmed):

  • [Major] docs/dev/read/rpc/debug_getRawHeader.md:79-80 (and 9 sibling pages: debug_traceBlockByHash.md, debug_traceBlockByNumber.md, debug_traceTransaction.md, eth_callMany.md, eth_getUncleByBlockHashAndIndex.md, eth_getUncleByBlockNumberAndIndex.md, eth_getUncleCountByBlockHash.md, eth_getUncleCountByBlockNumber.md, eth_protocolVersion.md) — every "Sources" section links to github.com/megaeth-labs/mega-reth and github.com/megaeth-labs/mega-rpc, which both return HTTP 404. Neither repo is in the megaeth-labs public repo list (which contains reth, mega-evm, stateless-validator, etc.). Readers who click a source link to verify a claim will get a 404, inverting the trust value of the newly added citation apparatus. CI does not catch this because lychee.toml has offline = true. Fix: point at the actual public repos (e.g., megaeth-labs/reth for the fork), drop the Sources section on pages whose source lives in a private repo, or run lychee non-offline in a scheduled workflow.

  • [Minor] docs/dev/read/rpc/eth_getWithdrawalProof.md:14 — Says the address parameter must be 0x4200000000000000000000000000000000000016, but the aliased method (docs/dev/read/rpc/mega_getWithdrawalProof.md:11-14) describes the same parameter as "the contract address to prove" with that L2ToL1 address only as a recommendation. Line 8 of the same file promises both names "route to the same node implementation" — so one of the two descriptions is wrong for the shared handler. Reconcile: either both pages fix the address to 0x4200…0016, or both describe it as an arbitrary contract with the L2ToL1 address as a recommendation.

  • [Minor] docs/dev/read/rpc/README.md:10 — Directs readers to the availability table "for … methods offered only by managed providers", but the table in overview.md no longer contains any managed-only rows: debug_getRawBlock, debug_getRawReceipts, debug_getRawTransaction, debug_replayBlock, debug_traceBlock, debug_traceCallMany, trace_callMany, trace_get, trace_rawTransaction, trace_replayBlockTransactions, and trace_replayTransaction were all deleted along with the "Managed only" classification. A reader looking up (say) debug_getRawBlock will find no entry and conclude MegaETH does not support it anywhere. Either restore a "Managed providers" subtable in overview.md, or drop the managed-providers phrase from this pointer.

Still open from the prior review (head SHA unchanged):

  • [Major] docs/dev/read/overview.md:74 (and surrounding table) — Six filter methods (eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterChanges, eth_getFilterLogs) that were Available in the base table are silently absent from the new table. Either re-add them as Unavailable rows with -32601, or explicitly note that filter-based polling is no longer registered on the public gateway.
  • [Major] docs/dev/send-tx/debugging.md:19 still promises debug_traceCall on the public endpoint; this PR marks it Unavailable at docs/dev/read/overview.md:38. Reconcile in this PR to avoid a silent doc-to-doc contradiction.
  • [Minor] docs/dev/read/rpc/eth_sendRawTransactionSync.md and docs/dev/read/rpc/realtime_sendRawTransaction.md cover the same synchronous submit-and-receipt flow but never cross-reference each other or explain the relationship (same handler? separate entry points?). Add a one-line cross-reference from each page to the other.
  • [Minor] docs/dev/read/rpc/mega_outputAtBlock.md:92,95 mixes real-looking captured hashes with obviously synthetic placeholders in a single example (parentHash and l1origin.hash are pattern-fillers next to real-looking values elsewhere). Make the example uniformly real or uniformly synthetic.
  • [Minor] docs/dev/read/rpc/eth_sendRawTransactionSync.md:100 shows blockHash: 0xffff…ffff sentinel without explanation. If it is a MegaETH pre-full-block sentinel, add a one-line note to the Returns table; otherwise replace it with a plausible-looking hash.

Pre-mortem (unverified):

  • docs/dev/read/overview.md:43,61,63-64 — Four methods (eth_callAfter, eth_getLogsWithCursor, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex) flip from Available/Managed only in the base table to Unavailable here. The PR description mentions probing the public endpoint but no raw probe artifact is linked in the diff. Please attach the curl transcript per contested row (or link one in the PR body) — two of these are standard library methods, and a wrong classification will cascade into third-party library fallback paths.

Pre-mortem: 3 candidates confirmed and reported above; 1 candidate ranked plausible-unverified is included as a verification request; 1 duplicate of the prior review (0xffff…ffff sentinel) suppressed; 1 rejected.

Delivery note: this round was intended to use the pending-review + inline-comments flow (see PR review contract). The POST /pulls/85/reviews/<review_id>/comments endpoint returned HTTP 404 from this environment on retry, so the pending review was deleted and all findings were consolidated into this single review body with explicit path:line anchors. Every finding is still actionable at those line references.

@Troublor

Copy link
Copy Markdown
Collaborator Author

Addressed all actionable findings in 34b4a74:

  • restored all six filter-method rows after live probes and added a full eth_uninstallFilter reference (the only callable method in that set)
  • reconciled debug_traceCall availability in the debugging guide
  • documented the shared synchronous handler and cross-linked eth_sendRawTransactionSync / realtime_sendRawTransaction
  • documented the streaming all-ff block-hash sentinel and canonical-refetch guidance
  • made the mega_outputAtBlock example uniformly synthetic
  • replaced public 404 links to internal source repositories with transparent commit/path provenance
  • reconciled withdrawal-proof address guidance and removed the stale managed-provider pointer
  • pinned Lychee 0.24.2 while retaining include_fragments = "full"; local lint passes

The PR description now includes the requested raw public-endpoint probe outcomes. The final inventory comparison is exact: 51 expected public methods and 51 reference pages.

@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 — all prior findings addressed; 2 new pre-mortem findings

  • Reviewed head SHA 34b4a74 against the prior review at b363af0. Every finding from the two previous rounds has been addressed in the new commit (docs: address RPC reference review feedback).
  • Nice work on the fixes: the six missing filter methods are now in the availability table, debugging.md and overview.md agree on debug_traceCall, the broken mega-reth / mega-rpc source links have been rewritten to internal-repo citations, the blockHash all-ff sentinel is now explained on both sync-submit pages, mega_outputAtBlock uses a uniformly synthetic example, and the two withdrawal-proof pages agree on the parameter semantics.
  • New findings from this round: 2, both body-only because their anchor lines are outside the RIGHT-side of the PR diff.

Body-only findings:

  • [Major] (pre-mortem, confirmed) docs/dev/send-tx/overview.md:122 — Still reads "Times out after 10 seconds if the transaction has not been executed." for realtime_sendRawTransaction. This PR corrected the same figure in docs/dev/read/realtime-api.md and the new docs/dev/read/rpc/realtime_sendRawTransaction.md (node default 5s, public gateway caps explicit timeouts at 3,000ms). Leaving the 10s figure on the Send Transaction landing page is a silent contradiction — a developer following that page will size their client wait budget to 10s and treat every capped submission as a false failure. Please reconcile in this PR, since the PR description explicitly commits to "correct stale … realtime timeout … guidance".

    Suggested wording:

    Returns the full transaction receipt directly.
    The node waits up to 5 seconds by default; the public gateway caps an explicit `timeout` at 3,000 milliseconds and returns `-32000 realtime transaction expired` if the deadline elapses first.
    See [`realtime_sendRawTransaction`](../read/rpc/realtime_sendRawTransaction.md) for the full reference.
    
  • [Minor] (pre-mortem, confirmed) docs/dev/read/overview.md:108 and docs/dev/read/overview.md:117 — The Rate Limiting section still lists eth_callAfter in the Simple category row and adds a bullet explaining its per-call budget, even though this PR reclassifies eth_callAfter as Unavailable at line 43 (the whole eth_callAfter.md reference page was deleted). The two mentions are stale and contradict the availability table in the same file. Drop eth_callAfter from the Simple-row description on line 108 and delete the line-117 bullet; the section already covers "all other read methods not listed in another category."

Pre-mortem (unverified):

  • docs/dev/send-tx/debugging.md:15 now tells developers to "use mega-evme for local call simulation or check whether a managed RPC provider exposes that method" in place of debug_traceCall. Please verify that mega-evme (or a specific managed provider) actually documents a working call-simulation path against Mainnet state at head, so users who follow the pointer land on a runnable substitute rather than an unsupported use case.

Pre-mortem: 2 confirmed and reported above; 1 plausible-unverified included as a verification request; 5 candidates rejected or suppressed.

@Troublor

Copy link
Copy Markdown
Collaborator Author

Follow-up review addressed in c645a25:

  • corrected the stale 10-second realtime_sendRawTransaction timeout in docs/dev/send-tx/overview.md to the 5-second node default and 3,000 ms explicit public-gateway cap
  • linked the debug_traceCall fallback directly to the runnable fork-mode mega-evme simulation section
  • built mega-evme from the current local source and verified the documented tx --fork --rpc ... --fork.block ... --trace --tracer call workflow against pinned Mainnet block 22092334; it completed successfully with a receipt and call trace

The reported eth_callAfter rate-limit references are already absent from head: an exact search across docs/**/*.md finds only the intended Unavailable row in docs/dev/read/overview.md. No change was made for that non-existent stale reference.

@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 — 1 new finding

Reviewed head c645a25d against the prior review at 34b4a74. The send-tx/overview.md 10s→5s reconciliation and the in-page mega-evme link both address the prior findings cleanly.

Inline anchoring on the pending review returned HTTP 404 from this environment (same failure mode as review round 2 documented in-thread), so both findings below are body-only with explicit path:line anchors. They remain actionable at those references.

Findings:

  • [Major] (pre-mortem, confirmed) docs/dev/read/rpc/eth_getBalance.md:34-35 — the Errors table cites -32001 and 4444, and line 37 links to error-codes.md for followup. But docs/dev/read/rpc/error-codes.md at head only documents -32700, -32099, -32601, -32019, -32020, -32021, -32022, -32000 — neither cited code appears. Same dead-end pattern in eth_getBlockByHash.md:64 (4444), eth_getBlockByNumber.md:64 (4444), eth_getBlockReceipts.md:70 (4444), eth_getCode.md:33-34 (-32001, 4444), eth_getStorageAt.md:39-40 (-32001, 4444), eth_getTransactionCount.md:34-35 (-32001, 4444), and debug_getHistoryTransactionCount.md:27 (-32001). Fix: add rows for -32001 (block selector cannot be resolved) and 4444 (historical state not available on this endpoint) to error-codes.md, or drop the See also [Error reference] pointer from pages that cite unlisted codes.

  • [Major] (merge-conflict alert) docs/dev/read/overview.md — PR 85 head has the simple CU-based Rate Limiting section (no eth_callAfter). Since PR 85 branched, main (via PR #83) replaced that section with the older four-tier table that still lists eth_callAfter in the Simple category and adds a per-method note about its 60M compute-gas cap. Because PR 85 does not touch those lines, the 3-way merge preserves main version, and the deployed page will contradict itself (eth_callAfter marked Unavailable in the availability table at :43, described as an active Simple-category method in Rate Limiting at merged :108 and :117). Please rebase against main and reconcile — either drop the eth_callAfter references from the older table or replace that section with the simple version.

Pre-mortem (unverified):

  • The PR deletes docs/dev/read/rpc/eth_callAfter.md (−123 lines) and docs/dev/read/rpc/eth_getLogsWithCursor.md (−128 lines) without adding a .gitbook.yaml redirect. If either slug has meaningful external inbound links (the PR description mentions the pages were previously drafted on developer-docs), the URLs will 404 after deploy. Confirm the inbound traffic to those slugs before merge, or add a redirects: block pointing them at dev/read/overview.md#available-methods.

Pre-mortem: 1 confirmed (error-codes.md gap, above), 1 plausible-unverified included as verification request, 1 rejected at head SHA but preserved as merge-conflict alert (Rate Limiting eth_callAfter — refuted against c645a25d but reappears after 3-way merge with main), 2 low-confidence hypotheses suppressed (GitBook anchor slugs, cast rpc snippet in the managed-provider tab).

@Troublor

Copy link
Copy Markdown
Collaborator Author

Addressed the latest review in 0484393 after safely merging current main (2d5b2f2) into the PR branch:

  • removed the eth_callAfter Simple-tier entry and per-method rate-limit note that current main would otherwise reintroduce
  • added shared error-reference rows for -32001 (Resource not found) and 4444 (pruned history unavailable)
  • added GitBook redirects from dev/read/rpc/eth_callAfter and dev/read/rpc/eth_getLogsWithCursor to dev/read/overview.md#available-methods, preserving inbound links after the unsupported draft pages are removed

Validation after the merge:

  • mise run lint
  • .gitbook.yaml parsed by Prettier
  • exact inventory comparison: 51 expected methods, 51 documented methods
  • no stale 10-second timeout or private-repository links

@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.

⚠️ 2 findings

Since the last Claude bot review, the branch has cleanly addressed every prior-round finding: -32001 and 4444 are now defined in docs/dev/read/rpc/error-codes.md:12-13; the RPC index no longer calls the disabled methods "managed-only" (docs/dev/read/rpc/README.md:10); redirects for eth_callAfter / eth_getLogsWithCursor were added in .gitbook.yaml; and the debug_traceCall availability caveat is stated in docs/dev/send-tx/debugging.md:15. The 51-method total in docs/dev/read/rpc/README.md:7 matches docs/SUMMARY.md.

Two new issues found in this pass are folded into the summary below (inline comment posting was blocked by tooling constraints in this environment).

Major

  • docs/dev/read/overview.md:114 — The read-rate-limit exemption bullet lists only eth_sendRawTransaction and realtime_sendRawTransaction, but this PR also introduces eth_sendRawTransactionSync as a first-class transaction-submission method (see docs/dev/read/rpc/eth_sendRawTransactionSync.md:8, which states the public gateway routes it through the same synchronous submission handler as realtime_sendRawTransaction). Readers will reasonably assume eth_sendRawTransactionSync falls under the read rate-limit tier documented above the bullet. Add eth_sendRawTransactionSync to the exemption list, and mirror the addition in the Request Body Limits table at docs/dev/read/overview.md:125 (which currently lists only the other two submission methods at 2.5 MiB).

Minor

  • docs/dev/read/rpc/eth_uninstallFilter.md:78 — The "Source" footer exposes an internal-repo path: Code: mega-reth@0264d0821a8fe14ac6c7f710e9452edef7407b3f, crates/rpc/rpc/src/eth/filter.rs (internal repository). The public docs should not leak private commit SHAs or file paths — they are not verifiable by external readers and hint at implementation details that may change. Either drop the pointer, or link to a public equivalent (mega-evm etc.) if one exists. Worth a repo-wide check for any other pages in the same batch that carry an (internal repository) footer.

Pre-mortem (unverified)

  • .gitbook.yaml — The added redirects: block uses source keys without a leading slash or .md suffix (e.g., dev/read/rpc/eth_callAfter: dev/read/overview.md#available-methods). Worth confirming against GitBook's current redirect schema that source paths are matched as URL paths (no .md) while destinations are file paths (with .md) — the asymmetry is easy to get wrong and only surfaces after deploy.

@Troublor

Copy link
Copy Markdown
Collaborator Author

Addressed both findings in 4fef1d8:

  • verified in the gateway source that eth_sendRawTransactionSync belongs to SEND_RAW_TX_METHODS alongside the other two submission methods, so it receives the same sequencer routing and 2.5 MiB body limit; added it to both overview entries
  • removed every (internal repository) commit/path footer across the public RPC reference, not just eth_uninstallFilter; public specification links and dated Mainnet probe evidence remain

The GitBook redirect shape is also confirmed against the current official GitBook content-configuration documentation: redirect paths are relative to root, the source is the old URL path without a leading slash, and the destination is the content file path. Both GitBook preview checks accepted the configuration on the prior head.

@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 re-review

  • Reviewed the 12-file incremental diff since the prior review at 048439366 (1 new commit: docs: complete public RPC policy guidance).
  • Both findings from the previous round are cleanly addressed:
    • eth_sendRawTransactionSync is now listed in the read rate-limit exemption bullet (docs/dev/read/overview.md:114) and in the Request Body Limits table (docs/dev/read/overview.md:125), matching its documented parity with realtime_sendRawTransaction.
    • Every (internal repository) source footer that leaked private mega-reth / mega-rpc SHAs and paths has been removed from all 11 pages that carried them; no other pages in docs/ still reference them.
  • The .gitbook.yaml redirects for eth_callAfter and eth_getLogsWithCursor land on the availability table, which does list both as Unavailable, so the deprecation is discoverable.
  • No new actionable findings.
  • Still open from earlier reviews: none.

Pre-mortem (unverified):

  • docs/dev/read/rpc/error-codes.md:13 — The new 4444 / pruned history unavailable row (also cited in eth_getBlockByHash.md:64 and eth_getBlockByNumber.md:64) is not covered by the PR probe table. Worth confirming with a probe against a pre-retention / beyond-history block hash that the public gateway actually emits numeric code 4444 (not -32001 or -32000); if the emitted code differs, integrator branches keyed on 4444 will silently never fire.

Pre-mortem: no verifiable high-impact failure path found in the incremental scope.

@github-actions github-actions 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.

❓ Review complete — 1 open question(s)

Reviewed head 78f47e8b.

Reviewed the RPC reference migration: 47 new method pages, availability-table restructure, redirects for two removed pages, and related overview/FAQ/gas-estimation edits.

Open questions:
Open question · Medium confidence

  • Does GitBook's .gitbook.yaml redirects: schema accept a target of the form path/to/page.md#anchor, or does it require a bare page URL (no .md, no fragment)? If the current form is not the documented syntax, dev/read/rpc/eth_callAfter and dev/read/rpc/eth_getLogsWithCursor will 404 after publish instead of redirecting to the availability table.
  • Why it matters: These are the only preservation path for inbound links to the two deleted pages (SDKs, blog posts, search-engine cached results). If the redirects are silently dropped at build time, users hit hard 404s on URLs that worked before the merge, and CI would not catch it (lychee only checks in-repo links).
  • How to verify: After deploy, GET https://docs.megaeth.com/dev/read/rpc/eth_callAfter and https://docs.megaeth.com/dev/read/rpc/eth_getLogsWithCursor and confirm the response is a 301/302 to dev/read/overview#available-methods (or the fragment-less equivalent). If either 404s, change targets to bare page URLs without .md, e.g. dev/read/rpc/eth_callAfter: dev/read/overview, and confirm the GitBook build log shows the redirects registered.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude review status

⚠️ 2 open finding(s)

Last reviewed: head f157be65

New this round: 2 · Resolved this round: 1 · Open questions: 2

@github-actions github-actions 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.

⚠️ Review needs attention — 1 finding(s)

0 blocking · 0 should-fix · 1 suggestion(s) · 0 open question(s)

Reviewed 78f47e8b..012a9d57.

Details are attached inline.

Comment thread docs/dev/rpc/README.md Outdated
Sending `Cache-Control: no-store` or `no-cache` as a _request_ header does not bypass the internal cache — request cache directives address intermediary caches, not the origin's own caching.
The gateway does not provide a request option that bypasses its internal cache.

## Method Reference

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.

[Nit] Empty ## Method Reference heading creates orphaned section in RPC index

Readers and GitBook's table-of-contents see a dangling section that contains no prose. Any anchor link to #method-reference lands on an empty heading, not a useful entry point.

Suggested fix: Remove line 135 (## Method Reference) and its trailing blank line (line 136). The subsections (## State and simulation, ## Blocks, transactions, and receipts, etc.) already self-organize the listing without a wrapper heading.

@github-actions github-actions 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.

⚠️ Review needs attention — 2 finding(s)

0 blocking · 0 should-fix · 2 suggestion(s) · 2 open question(s)

Reviewed head f157be65.

Details are attached inline.

Open questions:
Open question · Low confidence

  • Should docs/dev/rpc/operations-and-limits.md name the four methods eligible for the gateway's internal cache (eth_getBlockByNumber, eth_getBlockReceipts, eth_getHeaderByNumber, web3_clientVersion) and the immutable-tag rule, the way the deleted docs/dev/read/overview.md did?
  • Why it matters: The new page describes gateway caching only in general terms. The removed page listed the exact methods and stated that only requests for an explicit historical block number, block hash, or earliest tag are cache-eligible. If that concreteness matters to users (debugging stale-looking reads, understanding X-Workers-Cache-Status), the abstraction is a regression; if the list was expected to churn, the abstraction is intentional.
  • How to verify: Confirm with the RPC gateway owners whether the four-method allowlist and the immutable-tag rule are still stable enough to publish. If yes, add them back to operations-and-limits.md#gateway-caching.

Open question · Medium confidence

  • In docs/dev/rpc/reference/eth_getTransactionReceipt.md, the success example (lines 110–127) omits logs, logsBloom, and cumulativeGasUsed, which the Result schema (lines 59–63) documents as present on every receipt. Should the example be regenerated with those fields, or should the schema note them as sometimes omitted by the gateway?
  • Why it matters: The mismatch pushes readers to write parsers that tolerate missing fields where the spec says they are required, or the other way around — depending on which side they trust. Either direction is a wrong impression from a reference page whose purpose is to pin the exact wire contract.
  • How to verify: Re-run the documented probe (eth_getTransactionReceipt for 0xf3473347…8ed6 against https://mainnet.megaeth.com/rpc) and either update the example to include the missing fields or add an 'abridged for readability' note (like mega_outputAtBlock.md:114 uses) that points readers to the full schema.

Comment thread docs/dev/rpc/reference/README.md Outdated
| `trace_transaction` | Unavailable | The public endpoint returns `-32601`. |
| `web3_clientVersion` | Available | |

## Method Reference

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.

[Nit] Empty ## Method Reference heading regenerated in the new reference index

GitBook's page TOC and any anchor link to #method-reference land on an empty section. This is the same defect the prior review flagged on the old file path; the refactor relocated it rather than removing it.

Suggested fix: Remove line 86 (## Method Reference) and its trailing blank line. The subsequent H2s (## State and simulation, ## Blocks, transactions, and receipts, …) already organize the listing without a wrapper heading.

Comment on lines +76 to +80
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {

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.

[Minor] realtime_sendRawTransaction example receipt omits documented blockHash field

A client author reading only this example will treat blockHash (and other fields) as optional/absent, contradicting the documented schema and the parallel eth_sendRawTransactionSync example. This is exactly the kind of divergence the PR is trying to eliminate between the two aliased methods.

Suggested fix: Regenerate the example from a real probe so it matches the schema (include blockHash, transactionIndex, cumulativeGasUsed, effectiveGasPrice, L1 fee fields, etc., or explicitly note the example is abridged and the placeholder rule from line 40 applies). Keeping the two example receipts structurally identical would make the 'same handler' claim self-evident.

@Troublor
Troublor merged commit f7d7215 into main Jul 28, 2026
4 of 5 checks passed
@Troublor
Troublor deleted the williamaaroncheung/doc/complete-rpc-reference branch July 28, 2026 06:05
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