-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
all: remove kilic dependency from bls12381 fuzzers #30296
Conversation
c4e99a1
to
084a110
Compare
Looks like this fails currently:
|
This looks good to me! |
Ah there's one thing: We only fuzz the MSM precompiles using random inputs. I'm going to add two additional fuzzers that fuzz these with inputs that are known to be valid. |
I think it would be good to add the identity/zero point as input to one of these, along with other known valid points |
Yeah definitely. Actually, I need to give the added fuzzers a longer run and prob adjust the seed corpus to increase the coverage. |
Sorry, this seems to have been forgotten a bit, and bitrotted. Could you please rebase this? |
d28ee8f
to
da37c31
Compare
da37c31
to
75877e5
Compare
Oh, this is missing a cross fuzzer for g2 multiexp. |
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.
LGTM
@@ -172,6 +176,10 @@ compile_fuzzer github.com/ethereum/go-ethereum/tests/fuzzers/bls12381 \ | |||
FuzzG2Add fuzz_g2_add \ | |||
$repo/tests/fuzzers/bls12381/bls12381_test.go | |||
|
|||
compile_fuzzer github.com/ethereum/go-ethereum/tests/fuzzers/bls12381 \ | |||
FuzzCrossG2Mul fuzz_cross_g2_mul\ |
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.
This might not work, since FuzzCrossG2Mul
is a prefix of FuzzCrossG2MultiExp
Go complains on my machine about it:
go test --fuzz FuzzCrossG1Mul
testing: will not fuzz, -fuzz matches more than one fuzz test: [FuzzCrossG1MultiExp FuzzCrossG1Mul]
FAIL
exit status 1
The way I found to fix it, was to specify FuzzCrossG1Mul.
with a trailing dot.
I don't how if the compile_fuzzer script will work with this, but I think we should give it a try like it is right now and fix it up if necessary
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.
I think FuzzCrossG1Mul$
is another to way to make it work. However, we can try it as is. The compilescript passes it to gofuzz-shim. Seems to me that it's parsed literally, not regexpy: https://github.com/holiman/gofuzz-shim/blob/main/main.go#L95
The [kilic](https://github.com/kilic/bls12-381) bls12381 implementation has been archived. It shouldn't be necessary to include it as a fuzzing target any longer. This also adds fuzzers for G1/G2 mul that use inputs that are guaranteed to be valid. Previously, we just did random input fuzzing for these precompiles.
The [kilic](https://github.com/kilic/bls12-381) bls12381 implementation has been archived. It shouldn't be necessary to include it as a fuzzing target any longer. This also adds fuzzers for G1/G2 mul that use inputs that are guaranteed to be valid. Previously, we just did random input fuzzing for these precompiles.
The kilic bls12381 implementation has been archived. It shouldn't be necessary to include it as a fuzzing target any longer.
This also adds fuzzers for G1/G2 mul that use inputs that are guaranteed to be valid. Previously, we just did random input fuzzing for these precompiles.