Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

parity pubsub returns multiple logs, where as geth returns 1 log at a time if multiple logs in tx #6590

Closed
ewingrj opened this issue Sep 25, 2017 · 4 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Milestone

Comments

@ewingrj
Copy link

ewingrj commented Sep 25, 2017

Before filing a new issue, please provide the following information.

I'm running:

  • Parity version: v1.7.0-beta-5f2cabd-20170727
  • Operating system: MacOS
  • And installed: via installer homebrew

actual
If multiple events occur in a single tx, parity will return will return an array containing all logs when subscribed using pubsub.

expected
This is different then geth's behavior where geth will emit each event individually.

steps to reproduce

  1. subscribe to event logs.
  2. call a contract method that will emit multiple events.

web3/web3.js#1049 is a PR that was closed in web3js for context


@tomusdrw
Copy link
Collaborator

Are there any compelling reasons for that? What's the point of splitting it on the node side and increasing the total payload size?

@5chdn 5chdn added the Z1-question 🙋‍♀️ Issue is a question. Closer should answer. label Sep 26, 2017
@ewingrj
Copy link
Author

ewingrj commented Sep 26, 2017

I'm not sure. I can't think of any. However I submitted PR to web3 to handle this case and it was closed, so I thought I'd submit a bug here.

I can take it up with web3 as well.

@arkpar
Copy link
Collaborator

arkpar commented Sep 26, 2017

quoting @frozeman on the issue:
"the point of a subscription notifications is one notifcation per event
thats what we speced up a year ago
it also makes the code on the client side cleaner"

@frozeman
Copy link

frozeman commented Sep 26, 2017

Yes :) The point of a subscriptions is one notifcation per event. This is in the specs since more than a year. Its also easier to process than iterating over arrays on the client side.
And as it stands one side has to change, either geth or parity, and i am in favour of one notification per event.

@5chdn 5chdn added F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Sep 26, 2017
@5chdn 5chdn added this to the 1.9 milestone Oct 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

No branches or pull requests

5 participants