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

FEVM: Re-execute tipset on missing events #11335

Closed
Stebalien opened this issue Oct 16, 2023 · 2 comments · Fixed by #11588
Closed

FEVM: Re-execute tipset on missing events #11335

Stebalien opened this issue Oct 16, 2023 · 2 comments · Fixed by #11588
Labels

Comments

@Stebalien
Copy link
Member

If an Eth JSON-RPC API like EthGetTransactionReceipt fails because we're missing the transaction's events (e.g., because we enabled the Ethereum API after we processed the tipset, we should re-execute the tipset.

This will cause some work on otherwise pure "lookup" API requests however, this should only happen once and it should only happen for "old" tipsets. Although we do need to make sure that it only happens once (we may need some way to lock/deduplicate such requests?).

See #11325.

@Stebalien
Copy link
Member Author

Alternatively:

  1. Re-compute events in
    func (a *ChainAPI) ChainGetEvents(ctx context.Context, root cid.Cid) ([]types.Event, error) {
    on-demand.
  2. Fix the TODO so we actually use this everywhere.

That's probably better?

@Stebalien
Copy link
Member Author

The biggest hurdle here will be deduplicating the work. That is, StateManager.TipSetState coalesces all requests to compute a single tipset into a single request. However, it also avoids re-doing the computation if the state for that tipset (and the receipts) exist, without checking if the events associated with those receipts exist.

So fixing this will actually be a bit tricky. We could make the TipSetState function re-compute tipsets if we don't have all events, but that would force us to load the receipts/events to check (which isn't free).

Stebalien added a commit that referenced this issue Jan 18, 2024
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.

NOTE: This _won't_ backfill the index itself, it'll just give us the
events.

fixes #11335
Stebalien added a commit that referenced this issue Jan 18, 2024
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.

NOTE: This _won't_ backfill the index itself, it'll just give us the
events.

fixes #11335
Stebalien added a commit that referenced this issue Jan 30, 2024
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.

NOTE: This _won't_ backfill the index itself, it'll just give us the
events.

fixes #11335
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this issue May 11, 2024
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.

NOTE: This _won't_ backfill the index itself, it'll just give us the
events.

fixes filecoin-project#11335
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this issue May 16, 2024
This will re-execute tipsets to forcibly re-compute and store events
when they're missing. This is effectively lazy backfilling of events.

NOTE: This _won't_ backfill the index itself, it'll just give us the
events.

fixes filecoin-project#11335
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 a pull request may close this issue.

2 participants