Skip to content

Optimize SubscribeTransactionStatus to read status from notification payloads #3862

Description

@EgeCaner

rpc/v10/subscription_status.go (and the equivalent in v9) currently ignores the block/pre-confirmed payloads in onNewHead and onPreConfirmed (both take _) and always calls the fullTransactionStatus RPC on every notification. That path re-reads receipts from the DB and can fall back to the feeder gateway. Instead, when a new head or pre-confirmed notification arrives, check whether the subscribed tx hash is included in that payload and derive its status directly from memory (ACCEPTED_ON_L2 for new heads, PRE_CONFIRMED for pre-confirmed). The subscription should never fall back to the feeder gateway, status updates should be served purely from the notification payloads.

Activity

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

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