Skip to content

Specify subscription API #496

Description

@s1na

Most EL clients implement the subscription API documented here: https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub. These are widely adopted but not yet included in the specs. It's easy to specify eth_subscribe and eth_unsubscribe. I'm unsure how to specify the concrete methods (newHeads, newPendingTransactions, etc.) as they are passed as parameters to eth_subscribe. Plus when we push data, we're effectively sending an eth_subscription request from server to the client, and the data for that request depends on the concrete method.

After the current state is done I'd like to propose the following modifications:

  • Adding an optional parameter to newPendingTransactions named fullTx. It defaults to false. If true the server returns the full tx object instead of the hash. This is already merged in geth.
  • Adding an optional parameter to newHeads named verbosity. Default value of 0 returns only the hash. If value is 1, we return the complete head object. If value is 2, we return the complete block object. If value is 3 we return the block object + receipts.
  • Add optional parameter to newPendingTransactions named filter. The server uses the filter to narrow down the list of txes to return.

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