op-program: Fix missing block re-exec preimages in host#14027
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #14027 +/- ##
===========================================
- Coverage 47.16% 42.68% -4.48%
===========================================
Files 974 810 -164
Lines 81670 72433 -9237
===========================================
- Hits 38516 30918 -7598
+ Misses 40255 38793 -1462
+ Partials 2899 2722 -177
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f97582c to
39579ec
Compare
39579ec to
1cf221b
Compare
ajsutton
left a comment
There was a problem hiding this comment.
LGTM, but I suspect this won't capture the intermediate trie nodes for the transaction and receipt tries, because geth stores just the list of transactions and receipts, not the whole trie. We don't notice this normally because the prefetcher fetches the transactions and receipts using dedicated RPCs for fetching them (not debug_dbGet) and then rebuilds the trie and stores all the preimages:
optimism/op-program/host/prefetcher/prefetcher.go
Lines 412 to 437 in d895830
This code is necessary, I just think we'll also have to capture the transactions and receipts being captured and also write those intermediate nodes somehow. Could be a follow up though and definitely something worth having a test demonstrating their missing before adding so we know for sure we are capturing them (plus I'd be happy to be pleasantly surprised that they are getting stored...)
Thanks for checking. I'll follow up on making the txs and receipts intermediate nodes available. It should be pretty doable since the program has the full block. Just need to install a hook for the host to ingest it. |
…imism#14027) * op-program: Fix missing block re-exec preimages in host * check put key length
Make sure that the block data hint route persists all block data, including trie nodes in the host. Otherwise, the interop client won't be able to lookup, for example, receipts preimages needed for the consolidation step of the fault proof.
part of #14020