Skip to content

rpc: graphql and otterscan clean-ups from the #23969 review #23991

Description

@AskAlexSharov

Pre-existing items found in the review of #23969 (line numbers at its head acd1650). None changes behaviour on its own; each is a small separate fix.

  • graphql map helpers are mostly dead. After rpc: return a typed struct from the receipt methods #23969, the map-based helpers in cmd/rpcdaemon/graphql/graph/helpers.go are only used for withdrawals, and the comment at helpers_test.go:69 still describes the old receipt flow.
  • graphql fee fields duplicate ethapi.NewRPCTransaction. The type list at rpc/jsonrpc/graphql_api.go:77 repeats the type switch in ethapi.NewRPCTransaction, and the two already disagree for AccountAbstractionTxType: eth_getTransactionByHash shows the fee caps, graphql omits them.
  • ots_getBlockTransactions marshals every receipt before cropping the page. At rpc/jsonrpc/otterscan_api.go:418, moving the pageEnd > len(receipts) check up and marshalling only receipts[pageStart:pageEnd] gives the same result.
  • Lower-cased addresses pay for the EIP-55 checksum. strings.ToLower(addr.String()) at cmd/rpcdaemon/graphql/graph/resolver_helpers.go:190 (and for log and access-list addresses) computes the checksum and discards it; hexutil.Encode(addr[:]) gives the same string.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions