Skip to content
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

Merged
merged 22 commits into from
Aug 22, 2024
Merged

Conversation

anupsv
Copy link
Contributor

@anupsv anupsv commented Aug 13, 2024

Changes:

  • One step proof cleanups (i.e, length/kzg verification fixes)
  • Updated testing
  • Refactor existing tests to be compatible with CI

@anupsv anupsv requested a review from EthenNotEthan August 13, 2024 00:35
@anupsv anupsv changed the base branch from eigenda-v3.0.3 to arch/contract-updates-v3.0.3 August 13, 2024 00:36
@anupsv anupsv requested a review from bxue-l2 August 14, 2024 18:52
src/osp/OneStepProverHostIo.sol Outdated Show resolved Hide resolved
src/osp/OneStepProverHostIo.sol Outdated Show resolved Hide resolved
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");
Copy link

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

Copy link
Contributor Author

@anupsv anupsv Aug 15, 2024

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.

src/osp/OneStepProverHostIo.sol Show resolved Hide resolved
@EthenNotEthan EthenNotEthan changed the base branch from arch/contract-updates-v3.0.3 to eigenda-v3.0.3 August 21, 2024 06:08
@EthenNotEthan EthenNotEthan changed the title New osp fixes v3.0.3 v3.0.3: OSP Fixes and Cleanups Aug 21, 2024
@EthenNotEthan EthenNotEthan merged commit b74b3f0 into eigenda-v3.0.3 Aug 22, 2024
4 checks passed
EthenNotEthan pushed a commit that referenced this pull request Sep 4, 2024
@EthenNotEthan EthenNotEthan deleted the new-osp-fixes-v3.0.3 branch September 12, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants