-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat(host): Implement missing hint types in prefetch()
#249
Comments
Thanks for getting this together! Looks great so far.
Needs to take in just the code hash.
I believe this route is already implemented, but it should take in no data (just hint ID). It's only responsible for returning the preimage of the starting L2 output passed in through the boot info. #232
Specifically, we do not have access to the account information when the code is fetched. We need to use an endpoint that returns the preimage of the codehash, such as geth's
Nope, this is a trie-node-by-hash function. It should reveal the preimage of a state node hash. Also can use
For both of these routes, the output we are wanting does directly hash to the input. |
Thanks @clabby — this all seems good, just three questions:
|
Glad to explore this later, but for now, sticking w/ the single-layer cache.
The L2Transactions route is meant to store the preimages of all transactions within a block as well as the intermediate nodes within the
sg. We just merged into |
Is your feature request related to a problem? Please describe.
The
prefetch()
method takes in a hint, parses the hint type, and uses the hint to generate the required preimages in the oracle. Currently, there are a few hint types that are unimplemented:As additional client code is added to run the derivation pipeline, these will be necessary.
Describe the solution you'd like
Here are proposed solutions for each type:
debug_getRawHeader
on thel2provider
and savehash => raw header
.get_block_by_hash()
and pull out the transactions, use the existingstore_transactions()
machinery but adapt it for OP by using the op-alloy repo and OpTxEnvelope (which should work for L1 transactions too, need to confirm), this storespreimage => hash
all the way up the transaction trie.get_code_at()
, hash the code, storecodehash => code
.provider.get_proof()
for L2 message passer to get storage root, use similar code tocompute_output_root()
to hashversion | state root | storage root | input hash
, see questions on what to store.Questions:
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: