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

Fuzz the share commitment correctness #1744

Closed
evan-forbes opened this issue May 12, 2023 · 3 comments · Fixed by #1749
Closed

Fuzz the share commitment correctness #1744

evan-forbes opened this issue May 12, 2023 · 3 comments · Fixed by #1749
Assignees
Labels
testing items that are strictly related to adding or extending test coverage

Comments

@evan-forbes
Copy link
Member

Previous to #1690, we were recalculating the share commitment in each PFB using only subtree roots of the data square

for i, shareIndex := range wrappedTx.ShareIndexes {
commitment, err := inclusion.GetCommitment(cacher, dah, int(shareIndex), shares.SparseSharesNeeded(pfb.BlobSizes[i]))
if err != nil {
logInvalidPropBlockError(app.Logger(), req.Header, "commitment not found", err)
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
}
}
if !bytes.Equal(pfb.ShareCommitments[i], commitment) {
logInvalidPropBlock(app.Logger(), req.Header, "found commitment does not match user's")
return abci.ResponseProcessProposal{
Result: abci.ResponseProcessProposal_REJECT,
}
}
}

given the importance of this property and the complexity of the block construction/share encoding, we should replicate this check using some form of fuzzer.

@evan-forbes evan-forbes added the testing items that are strictly related to adding or extending test coverage label May 12, 2023
@evan-forbes evan-forbes added this to the Mainnet milestone May 12, 2023
@evan-forbes
Copy link
Member Author

also see #1726 which adds a test for the share commitment

@cmwaters
Copy link
Contributor

I can pick this up. I had thought about appending it to the existing fuzzy test I had written

@cmwaters cmwaters self-assigned this May 12, 2023
@evan-forbes
Copy link
Member Author

I had thought about appending it to the existing fuzzy test I had written

that would be perfect!

cmwaters added a commit that referenced this issue May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing items that are strictly related to adding or extending test coverage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants