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

Resistant Event Sub #40

Closed
ggwpez opened this issue Apr 8, 2021 · 0 comments · Fixed by #116
Closed

Resistant Event Sub #40

ggwpez opened this issue Apr 8, 2021 · 0 comments · Fixed by #116
Labels
feature New Feature

Comments

@ggwpez
Copy link
Contributor

ggwpez commented Apr 8, 2021

Location: Package [backend/eth/glue], part of #19

Motivation: The Resistant Event Sub tracks the state of an event in the case of a chain reorganization.

Design: Analogous to #39 the design is very simple. It wraps an EventSub and accepts a finalityDepth. The necessary ChainReader is provided by the ContractBackend.

It tracks the status of an Event by subscribing to new block chain headers and then checking all events for finality.
Once an Event is final, it is emitted on the sink channel that the user passed to Read.

uml
uml.txt

Testing: So far i am testing that final Events arrive even after reorgs. Still needs to be slightly extended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants