-
Notifications
You must be signed in to change notification settings - Fork 2
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
v3.0.3: OSP Fixes and Cleanups #18
Conversation
src/osp/OneStepProverHostIo.sol
Outdated
require(z < BN254.FR_MODULUS, "Z_LARGER_THAN_FIELD"); | ||
require(y < BN254.FR_MODULUS, "Y_LARGER_THAN_FIELD"); | ||
|
||
require((keccak256(kzgProof[224:288]) == bytes32(kzgProof[:32])) && (bytes32(kzgProof[:32]) == leafContents), "KZG_PROOF_WRONG_HASH"); |
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.
I remembered we hashed datalength into the data too. why is it correct here
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.
It appears that the place where we hash data and length isn't referenced here and seems to be isolated away. In this code it appears that the data for the msp tree is from the other way the hash is created. This is the same way for 4844 from what I can tell. Interesting part is, even if we match the hash data to each other, there is still no connection between the 2 systems on the contract level. Maybe something offchain does.
…data hash calculation logic
…tracts into epociask--length-fixes-v3.0.3
fix: Include length in preimage hash generation
Changes: