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: api: exclude reverted events in eth_getLogs results #11318

Merged

Conversation

i-norden
Copy link
Contributor

@i-norden i-norden commented Oct 9, 2023

Related Issues

In Ethereum it is expected that the eth_getLogs endpoint will only return results for canonical blocks. Non-canonical logs are already being marked correctly in the events.db sqlite database as "reverted", and this adds a missing conditional check on that column when selecting logs from the database.

Proposed Changes

Adds a missing conditional check on the "reverted" column when selecting logs from the events index sqlite database.

Additional Info

Necessary for proper subgraph functionality.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in (N/A)
  • Tests exist for new functionality or change in behavior
  • CI is green (I don't think the one failing test is due to these changes, I think it is some CI finickyness)

@i-norden i-norden requested a review from a team as a code owner October 9, 2023 14:45
@i-norden i-norden changed the title fix: exclude reverted events in eth_getLogs results fix: api: exclude reverted events in eth_getLogs results Oct 9, 2023
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM. For anyone else wondering, this won't affect EthSubscribe because that doesn't look at historical events.

@Stebalien Stebalien merged commit 84b0751 into filecoin-project:master Oct 24, 2023
i-norden added a commit to vulcanize/lotus that referenced this pull request Nov 20, 2023
…project#11318)

* exclude reverted events from results returned by eth_getLogs

* unit test

* update CHANGELOG.md
i-norden added a commit to vulcanize/lotus that referenced this pull request Dec 11, 2023
…project#11318)

* exclude reverted events from results returned by eth_getLogs

* unit test

* update CHANGELOG.md
i-norden added a commit to vulcanize/lotus that referenced this pull request Jan 18, 2024
…project#11318)

* exclude reverted events from results returned by eth_getLogs

* unit test

* update CHANGELOG.md
jonathanface pushed a commit to vulcanize/lotus that referenced this pull request Mar 12, 2024
…project#11318)

* exclude reverted events from results returned by eth_getLogs

* unit test

* update CHANGELOG.md
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.

2 participants