-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Option to back-fill events by re-execution of messages #11744
Comments
See lotus/node/impl/full/eth_utils.go Lines 737 to 750 in 2e75f3b
For how I'm doing this in the Eth API. |
In terms of automatically backfilling, we can:
|
Hey @rjan90, Is this issue available? |
This issue is coupled with #11007; we've been discussing that we probably need to ditch the lotus-shed command entirely since it's broken (e.g. see this). But it might not be a bad idea to bite off this as separate piece of work that can be pulled in to an automatic backfilling (in #11007) later. So making it work in lotus-shed to start with would probably be helpful. @akaladarshi the code pointer referenced above by stebalien is 👌 for doing this. You could experience this problem if you synced a lotus node from a recent snapshot (mainnet or calibnet), let it run and sync, and then try and run |
This is being subsumed by work in #12453 |
Checklist
Ideas
.Lotus component
What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.
lotus-shed indexes backfill-events
will walk through specified epochs and extract events from the AMT referenced byreceipt.EventsRoot
and put them in the index for you. But, it can't do anything if you haven't been recording the events in your blockstore.If both
Fevm.EnableEthRPC
(existing config option, defaults tofalse
) orEvents.EnableActorEventsAPI
(new with 1.26.0, defaults tofalse
) are set tofalse
thenEnableStoringEvents
isn't set, which prevents both decoding and storing of events on FVM execution.lotus/chain/vm/fvm.go
Lines 526 to 531 in 2e75f3b
lotus/chain/consensus/compute_state.go
Lines 233 to 236 in 2e75f3b
events
don't get populatedlotus/chain/consensus/compute_state.go
Lines 367 to 374 in 2e75f3b
Because the current backfill operation relies on
ChainGetEvents
which itself relies on being able to load the event AMT from its root CID on the message receipt from the blockstore. Which won't be there if you haven't configuredFevm.EnableEthRPC=true
orEvents.EnableActorEventsAPI=true
.Describe the solution you'd like
We have a
StateCompute
API call which should be able re-execute arbitrary tipsets as long as we have both the previous state and the message. It can be seen used inlotus shed compute-state-range
andlotus-shed mismatches
.In theory you should be able to do a two-step events index backfill by running this and then running
lotus-shed indexes backfill-events
. This needs investigation but it's not clear to me at the time of writing that thechain.consensus.TipSetExecutor#ApplyBlocks
code I pointed to above gets involved at all in theStateCompute
path, it may use an alternative executor. In which case we may need to either come up with a newStateCompute
, or get it to turn onReturnEvents
by default and then persist events likeTipSetExecutor
does.The ideal, however, is to provide an option to
lotus-shed indexes backfill-events
to be able to re-execute tipsets where the events were not collected.Describe alternatives you've considered
Document a two-step process. of using two separate
lotus-shed
operations—but I'm not sure this will actually work as it is today.Additional context
No response
The text was updated successfully, but these errors were encountered: