go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

all: remove kilic dependency from bls12381 fuzzers

Open jwasinger opened this issue 1 year ago • 5 comments

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.

jwasinger avatar Aug 14 '24 00:08 jwasinger

Looks like this fails currently:

func TestCrossG1MultiExp(t *testing.T) {
	input := []byte("0")
	fuzzCrossG1MultiExp(input)
}

MariusVanDerWijden avatar Aug 15 '24 07:08 MariusVanDerWijden

This looks good to me!

kevaundray avatar Aug 20 '24 14:08 kevaundray

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.

jwasinger avatar Aug 20 '24 15:08 jwasinger

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

kevaundray avatar Aug 20 '24 16:08 kevaundray

Yeah definitely. Actually, I need to give the added fuzzers a longer run and prob adjust the seed corpus to increase the coverage.

jwasinger avatar Aug 20 '24 16:08 jwasinger

Sorry, this seems to have been forgotten a bit, and bitrotted. Could you please rebase this?

holiman avatar Nov 08 '24 07:11 holiman

Oh, this is missing a cross fuzzer for g2 multiexp.

jwasinger avatar Nov 08 '24 09:11 jwasinger