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

Add new Rust fuzzer #457

Merged
merged 4 commits into from
Jul 25, 2024
Merged

Add new Rust fuzzer #457

merged 4 commits into from
Jul 25, 2024

Conversation

jtraglia
Copy link
Member

  • Replace old C LLVMFuzzer with new cargo-fuzz implementation in Rust.

@asn-d6
Copy link
Contributor

asn-d6 commented Jul 24, 2024

Should we add a README here (this PR deleted one)? Or briefly mention how to run the fuzzer in the README?

@jtraglia
Copy link
Member Author

Should we add a README here (this PR deleted one)? Or briefly mention how to run the fuzzer in the README?

Good idea. I've added a basic readme. Please walk through this to make sure it's correct.

@asn-d6
Copy link
Contributor

asn-d6 commented Jul 25, 2024

Hm. I got some undefined reference issues when running cargo fuzz run fuzz_verify_blob_kzg_proof:

/usr/bin/ld: /home/user/eth/c-kzg-4844/fuzz/target/x86_64-unknown-linux-gnu/release/build/c-kzg-852250952b678b24/out/libckzg.a(b638502d7019dfbe-c_kzg_4844.o): in function `g1_mul':
          /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:409:(.text.g1_lincomb_naive+0x5f): undefined reference to `blst_scalar_from_fr'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:410:(.text.g1_lincomb_naive+0x7d): undefined reference to `blst_p1_mult'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/fuzz/target/x86_64-unknown-linux-gnu/release/build/c-kzg-852250952b678b24/out/libckzg.a(b638502d7019dfbe-c_kzg_4844.o): in function `g1_lincomb_naive':
          /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:682:(.text.g1_lincomb_naive+0x8f): undefined reference to `blst_p1_add_or_double'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/fuzz/target/x86_64-unknown-linux-gnu/release/build/c-kzg-852250952b678b24/out/libckzg.a(b638502d7019dfbe-c_kzg_4844.o): in function `validate_kzg_g1':
          /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:576:(.text.validate_kzg_g1+0x1d): undefined reference to `blst_p1_uncompress'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:577:(.text.validate_kzg_g1+0x41): undefined reference to `blst_p1_from_affine'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:580:(.text.validate_kzg_g1+0x49): undefined reference to `blst_p1_is_inf'
          /usr/bin/ld: /home/user/eth/c-kzg-4844/src/c_kzg_4844.c:582:(.text.validate_kzg_g1+0x55): undefined reference to `blst_p1_in_g1'

Not sure if this is my own issue or not. Likely my own issue.

Copy link
Contributor

@asn-d6 asn-d6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@asn-d6 asn-d6 merged commit 3644ae9 into ethereum:main Jul 25, 2024
38 checks passed
@jtraglia jtraglia deleted the rust-fuzzer branch July 25, 2024 07:39
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