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

Refactor event processing #51

Open
aminlatifi opened this issue Aug 10, 2021 · 1 comment
Open

Refactor event processing #51

aminlatifi opened this issue Aug 10, 2021 · 1 comment
Assignees

Comments

@aminlatifi
Copy link
Member

Bridge monitor should process Waiting events ordered by time events are emitted, but currently we order them by blocknumber.
As events are fetched from two different chains, blocknumber value is not the correct field to order events based on. This causes events not be processed in order and failure in some procedures.

To understand what issue could happen, donate and withdraw actions each have two events which should be processed in order and be matched to each other. One in home network (mainnet) and one in foreign network (rinkeby).
Reliance on blocknumber field may cause processing second event first.

@mohammadranjbarz
Copy link
Collaborator

Bridge monitor should process Waiting events ordered by time events are emitted, but currently we order them by blocknumber.
As events are fetched from two different chains, blocknumber value is not the correct field to order events based on. This causes events not be processed in order and failure in some procedures.

To understand what issue could happen, donate and withdraw actions each have two events which should be processed in order and be matched to each other. One in home network (mainnet) and one in foreign network (rinkeby).
Reliance on blocknumber field may cause processing second event first.

@aminlatifi could you give me permission to push branch in this repository

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

No branches or pull requests

2 participants