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

Fix soundness bug in aggregator pi datahash #691

Conversation

zhenfeizhang
Copy link

Description

constraint

// 3 batch_data_hash and chunk[i].pi_hash use a same chunk[i].data_hash when
// chunk[i] is not padded
//
// batchDataHash = keccak(chunk[0].dataHash || ... || chunk[k-1].dataHash)
//
// chunk[i].piHash =
//     keccak(
//        &chain id ||
//        chunk[i].prevStateRoot ||
//        chunk[i].postStateRoot ||
//        chunk[i].withdrawRoot  ||
//        chunk[i].datahash)

was implemented incorrectly. The one gets implemented was

// 8. batch data hash is correct w.r.t. its RLCs

This PR fixes this issue.

Issue Link

[link issue here]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Contents

  • [item]

Rationale

[design decisions and extended information]

How Has This Been Tested?

tested mock prover with mock chunks

cargo test --release

@zhenfeizhang zhenfeizhang self-assigned this Aug 1, 2023
@zhenfeizhang
Copy link
Author

closed as integrated to #712

@zhenfeizhang zhenfeizhang deleted the fix-aggregator-pi-datahash branch August 4, 2023 15:55
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.

2 participants