[OpenRPC] Add arbtrace_ method definitions for Arbitrum One#1185
[OpenRPC] Add arbtrace_ method definitions for Arbitrum One#1185JackReacher0807 wants to merge 3 commits intomainfrom
Conversation
Add 8 arbtrace_ method definitions as component schemas: - arbtrace_block - arbtrace_call - arbtrace_callMany - arbtrace_filter - arbtrace_get - arbtrace_replayBlockTransactions - arbtrace_replayTransaction - arbtrace_transaction These are Arbitrum-specific tracing methods for pre-Nitro blocks (before block 22,207,815). Includes shared schemas for TraceObject, TraceAction, TraceResult, TraceCallResult, TransactionCallObject, TraceTypeArray, and TraceFilterObject. Method definitions only — chain spec references will be added via Daikon's automated workflow in a separate config PR.
🔗 Preview Mode
|
🔍 Link CheckStatus: ⏭️ Skipped (no content changes) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 808a12994e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| items: false | ||
| prefixItems: |
There was a problem hiding this comment.
Use draft-07 tuple schema for arbtrace_callMany
arbtrace_callMany models each call pair with items: false and prefixItems, but OpenRPC 1.2 schema objects follow JSON Schema draft-07 where prefixItems is not a tuple keyword. In draft-07 terms this leaves items: false active while minItems: 2 is also required, making every inner call tuple unsatisfiable and causing real requests to fail schema-driven validation/generation. Please encode this tuple with draft-07 keywords (e.g., items as a 2-element schema array plus additionalItems: false).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — prefixItems is indeed a JSON Schema 2020-12 keyword, not available in draft-07 which OpenRPC 1.2 uses. Fixed in 1e2235f: replaced items: false + prefixItems with a draft-07 tuple using items as a 2-element schema array plus additionalItems: false. Validation and generation both pass.
| $ref: "../evm/base-types.yaml#/components/schemas/address" | ||
| description: The address of the receiver. Null for contract creation. |
There was a problem hiding this comment.
Allow null
to for contract-creation trace actions
TraceAction.to is constrained to the non-null address schema, but its own description states this field is null for contract creation. Because this shared schema is used by all arbtrace methods, valid create traces will be rejected (and client types will be wrong) whenever to is returned as null.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid point — TraceAction.to is null for contract creation traces, so constraining it to a non-null address schema would reject valid responses. Fixed in 1e2235f: changed the to property to use oneOf: [address, null] so both regular calls and contract-creation traces validate correctly.
- arbtrace_callMany: Replace prefixItems (2020-12) with items array + additionalItems: false for draft-07 compatibility - TraceAction.to: Use oneOf with address | null to allow null for contract-creation traces
Summary
Adds OpenRPC method definitions for 8
arbtrace_methods supported on Arbitrum One.Methods added
arbtrace_block— Returns traces created at a given blockarbtrace_call— Traces the execution of eth_call within a specific block contextarbtrace_callMany— Executes multiple calls and returns traces for eacharbtrace_filter— Returns traces matching a given filterarbtrace_get— Returns trace at a given positionarbtrace_replayBlockTransactions— Replays all transactions in a block returning requested tracesarbtrace_replayTransaction— Replays a transaction returning the requested tracesarbtrace_transaction— Returns all traces of a given transactionDetails
src/openrpc/chains/_components/arbtrace/methods.yamlValidation
pnpm run generate:rpc— passedpnpm run validate:rpc— passedLinear: DOCS-32