Receipts working with Generic Struct Extraction#430
Conversation
…n column gadget.
…et_unsafe` for initializing with one target.
…d into the metadata digest.
nicholas-mainardi
left a comment
There was a problem hiding this comment.
Took a look at the circuit code again to see changes done. Nice improvements but I think there are still a couple of changes to be done to circuits and APIs
nicholas-mainardi
left a comment
There was a problem hiding this comment.
Looks definitely better now, thanks for all the changes! I think that in terms of circuits the only thing left is binding the extraction ids of extracted columns to the data found in the receipt trie node, and the potential issue with the RLP decoding of the transaction index. Other previous issues look solved now to me. All other comments are all minor/quick things. I will take a look to all the non circuit code as well next.
| } | ||
| } | ||
|
|
||
| pub struct BlockUtil { |
There was a problem hiding this comment.
Why not moving it to test module given that it seems to be used only in tests?
9d292a7 to
0d3f1d4
Compare
1345edd to
9a0932c
Compare
This PR closes CRY-21 upon merge.
A very sizeable PR that makes the Generic Struct Extraction Code and Receipt Extraction Code work together.
It has made reasonably large differences to both. The most noticeable is the change to
ColumnData,ColumnDataGadgetandMetadataGadget. Since the EVM only works in bytes I have removed thebit_offsetaspects of the code and rewritten the extraction circuits to reflect this. They now no longer use lookups which should result in an overall speed up in proving time (since you no longer have to run the lookup PIOP).In addition to this, instead of just having
ColumnInfowe now haveExtractedColumnInfoandInputColumnInfo. This is to reduce work done when computing value digests but still keep everything grouped together.The Receipt extraction now uses the new
TableMetadatastruct just like struct extraction does and I have also made aFrom<EventLogInfo>implementation to easily construct columns with identifiers.I tried to remove some of the unnecessary generic constants (for instance those on storage leaf nodes and MPT extension nodes) that have a fixed length when viewed in a circuit. In order to make the compiler stop complaining about
unconstrained generic constantI had to use the actual number values rather than being able to declare a constant and use that.For Receipt proving in the integration test we use the code in
mp2_v1/src/value_extraction/planner.rssince we don't need to keep track of previous value extraction in the receipt case.