You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Open-RPC cannot express the semantics of the eth_subscribe. It is one method that can have a different set of params based on the event type. E.g.:
If type is logs next param can be a filter { address: .., topics: ..}
The other types don't have at the moment further parameters.
The same thing happens in the notification requests, i.e. eth_subscription. Each event returns a different object. Because the parameters of this request are addressed by key, we could define a schema with keys for all possible event types. But that's less than ideal.
There exists an issue open-rpc/spec#381 which if fixed would unblock this item.
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
andeth_unsubscribe
. I'm unsure how to specify the concrete methods (newHeads
,newPendingTransactions
, etc.) as they are passed as parameters toeth_subscribe
. Plus when we push data, we're effectively sending aneth_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:
newPendingTransactions
namedfullTx
. It defaults to false. If true the server returns the full tx object instead of the hash. This is already merged in geth.newHeads
namedverbosity
. 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.newPendingTransactions
namedfilter
. The server uses the filter to narrow down the list of txes to return.The text was updated successfully, but these errors were encountered: