Skip to content

fix firehose eth CallHandler triggering on reverted calls#3762

Merged
leoyvens merged 3 commits into
masterfrom
stepd/fix_poi_reverted_call_handler
Jul 24, 2022
Merged

fix firehose eth CallHandler triggering on reverted calls#3762
leoyvens merged 3 commits into
masterfrom
stepd/fix_poi_reverted_call_handler

Conversation

@sduchesneau
Copy link
Copy Markdown
Contributor

@sduchesneau sduchesneau commented Jul 21, 2022

firehose exposes calls that are "failed" or "reverted". current behavior is to only filter out the transactions that are completely reverted (from the status in the Receipt).

This fixes POI inconsistencies seen in QmPDp878JK2RcvXNhWX1UQHYbhF8iEcWPTdnP9bJvy6L6P (and hopefully QmUrfWjK7rdXzbr3q6D2DVDapCw4yWBU88qjrNvZUewoNy too)

Additional notes

  • Current filtering from RPC traces is done on the existence of the error field. This field does not exist in firehose calls, so we must use another firehose-specific field.
  • UPDATE -
  • issue Bug: Call handler improperly invoked when call was reverted on-chain #3701 shows us that we shouldn't only skip calls that are failed, but any call that is reverted too (calls are reverted if their parent is reverted).
  • In firehose, this means that we must use state_reverted field to correctly skip calls that had no effect on the chain.
  • In RPC, it is more complex to fix.

We need to be able to compare existing POIs from RPCs with POIs from firehose to ensure that the transition is successful, so this PR will make firehose mimic the RPC behavior (and not fix #3701 for the moment).

@sduchesneau sduchesneau requested review from leoyvens and maoueh July 21, 2022 20:03
@leoyvens leoyvens merged commit 3dc9448 into master Jul 24, 2022
@leoyvens leoyvens deleted the stepd/fix_poi_reverted_call_handler branch July 24, 2022 18:55
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.

Bug: Call handler improperly invoked when call was reverted on-chain

2 participants