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

fix: Getting event logs on Aurora #149

Merged
merged 5 commits into from
Jan 20, 2022
Merged

fix: Getting event logs on Aurora #149

merged 5 commits into from
Jan 20, 2022

Conversation

simonas-notcat
Copy link
Contributor

Aurora (and maybe some other EVM chains) fail to return event logs if fromBlock and toBlock are the same. This PR fixes that by substracting 1 from fromBlock

Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good,
But since this is a workaround specific to Aurora,
I'd like us to add some tests to make sure that events are processed as expected when they overlap in the same block.

Example:

  • adding 2 services in 2 consecutive blocks should result in only 2 services appearing in the DID doc (no duplication).
  • adding and removing a service in the same block should result in no change to the doc (correct order, same block)
  • adding and removing a service in 2 consecutive blocks should result in no change to the doc (correct order 2 blocks).
  • removing a service and then adding it back in the next block should keep the service visible in the resolved doc (correct order 2 blocks, corner case).

@mirceanis mirceanis merged commit 5ee6bed into master Jan 20, 2022
@mirceanis mirceanis deleted the fix/aurora branch January 20, 2022 14:32
uport-automation-bot pushed a commit that referenced this pull request Jan 20, 2022
## [5.0.4](5.0.3...5.0.4) (2022-01-20)

### Bug Fixes

* broaden window for event logs processing (fix Aurora) ([#149](#149)) ([5ee6bed](5ee6bed))
@uport-automation-bot
Copy link
Collaborator

🎉 This PR is included in version 5.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants