Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth/filters: annotate logs in a sub with block end markers #24823

Closed
wants to merge 1 commit into from

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented May 5, 2022

EDIT: Ugh, so this doesn't actually work, because the *types.Log embedding redefines JSON marshalling, which overrides it even for the wrapper. Ugh

Fixes #24787

When subscribing to logs, the user will get a never ending stream of them. It can be annoying to figure out whether the last log of a block arrived, or if there's some more in the pipeline. This PR adds a block end marker into logs.

@karalabe karalabe added this to the 1.10.18 milestone May 5, 2022
@holiman
Copy link
Contributor

holiman commented May 5, 2022

From @fjl

We can add field Last in types.Log
With omitempty)
Clients will also need it, and the type used in subscription is types.Log

@karalabe
Copy link
Member Author

So, to make this work we should:

  • Add the Last to types.Log
  • Set it during loading from the db
  • Set it whenever we refilter

@holiman holiman modified the milestones: 1.10.18, 1.10.19 May 25, 2022
@holiman holiman removed this from the 1.10.19 milestone Sep 9, 2022
@fjl
Copy link
Contributor

fjl commented Nov 10, 2022

Closing because #26109 is more up-to-date.

@holiman
Copy link
Contributor

holiman commented Nov 30, 2022

Closing because #26109 is more up-to-date.

@holiman holiman closed this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push filter updates in batch on new block
4 participants