-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
op-program: Populate preimage store #5452
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
d383e68
to
d99b6f6
Compare
09a410e
to
9e3a7f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good, but I think we want to use the L1/L2 interfaces with error handling in the prefetcher, since it's running in the host.
Alternatively we could also add error-returns to the "fetching oracle" code, if there's functionality there that we want to share rather than plugging directly into a L1/L2 client from |
As per Slack discussion: updated the prefetcher to take an interface matching the L1/L2 rpc bindings (and added debug bindings for the MPT-node / code fetching). This way the prefetcher can handle errors and bubble them up to the get-preimage caller (who can then shut down the program from the host side etc.). |
…e oracle op-program now uses an in-memory key-value store as the backing for all data with the same key-based retrieval and deserialization as in non-fetching mode.
09a1965
to
4739b0f
Compare
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
Implements a pre-fetcher that takes in the hints from
HintReader.NextHint
and request for preimages fromOracleServer.NextPreimageRequest
and then populates the KV store by fetching required data.Modifies the op-program main to use this fetcher and an in-memory KV store as the backing for oracle requests. This makes the fetching mode run using the same key/value requests and access as non-fetching mode would just using hints to fetch the required data on demand.
Additional context
Builds on #5463 and #5465
Metadata