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
Add some CKZG property tests #6596
Add some CKZG property tests #6596
Conversation
Maybe we should change the |
Thanks for the PR. It would be very useful to have those tests. Potentially can create a @jtraglia Ignore the above. |
Adding a note to change the trusted_setup being used here to the one being used in the consensus-specs. It won't produce any errors, but it makes life easier if everyone is using the same trusted setup file. Assosciated PR to change it in the c-kzg repo: ethereum/c-kzg-4844#33 |
21f6b71
to
f43febc
Compare
No worries, I understand. I can verify that it is indeed fixed. Also, I moved some things around before I noticed your other PR which made some difficult conflicts but I fixed those. I think it makes sense to put the trusted setups in test fixtures so both source trees can use them. I added the setup for minimal too, in case we want to test that later. |
So why is |
Because |
Okay thanks for explaining. That makes sense. I'll see what I can do to fix it tomorrow. |
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.
Hi LGTM. Got one nit. Why are the tests suffixed throwsExpected
? In my mind it's a mix of successful and failed calls. (since the kzg library checks if the passed parameters are canonical, so very likely most will fail, but some may pass).
Thanks. The How about using the "fuzz" keyword instead? One of these:
|
I like fuzz. :) The camel case looks good. |
Good call, I like that better too. Thanks! |
(y) Thanks for the PR again. The property tests bring more confidence in the code. Gonna merge now. |
PR Description
I've been reviewing EIP-4844 code today & wrote some fuzzing tests for CKZG methods. I ran into a segmentation fault in
libckzg4844jni
, so I thought I might as well make a PR with my work. I haven't run into problems with the other methods.Things worth mentioning:
CKZG4844Utils
because most of the methods touch the filesystem.ZKGCommitment
andZKGProof
.The problem
Spoiler: I'm fairly certain it's because there's a zero-length "blob" in
blobs
.The following
List<Bytes> blobs
passed tocomputeAggregateKzgProof
:Will cause a segmentation fault:
More information: hs_err_pid53565.log
Documentation
doc-change-required
label to this PR if updates are required.Changelog