test/fuzz: add crypto/merkle.FuzzProofsFromByteSlices#8470
Closed
odeke-em wants to merge 1 commit intotendermint:masterfrom
orijtech:fuzz-add-crypto_merkle-FuzzProofsFromByteSlices
Closed
test/fuzz: add crypto/merkle.FuzzProofsFromByteSlices#8470odeke-em wants to merge 1 commit intotendermint:masterfrom orijtech:fuzz-add-crypto_merkle-FuzzProofsFromByteSlices
odeke-em wants to merge 1 commit intotendermint:masterfrom
orijtech:fuzz-add-crypto_merkle-FuzzProofsFromByteSlices
Conversation
Adds a fuzzer to exorcise merkle.ProofsFromByteSlices.
creachadair
approved these changes
May 6, 2022
| var fakeSeparator = []byte("***FAKE_MARKER***") | ||
|
|
||
| for i := 0; i < 10; i++ { | ||
| total := 100 |
There was a problem hiding this comment.
Suggested change
| total := 100 | |
| const total = 100 |
Contributor
Author
There was a problem hiding this comment.
This is kind of pedantic :-)
| } | ||
|
|
||
| // [][]byte isn't supported as an input hence add []byte values. | ||
| var fakeSeparator = []byte("***FAKE_MARKER***") |
There was a problem hiding this comment.
Suggested change
| var fakeSeparator = []byte("***FAKE_MARKER***") | |
| fakeSeparator := []byte("***FAKE_MARKER***") |
creachadair
reviewed
May 10, 2022
Comment on lines
+9
to
+11
| "github.com/tendermint/tendermint/crypto/merkle" | ||
| "github.com/tendermint/tendermint/crypto/tmhash" | ||
| tmrand "github.com/tendermint/tendermint/libs/rand" |
There was a problem hiding this comment.
Suggested change
| "github.com/tendermint/tendermint/crypto/merkle" | |
| "github.com/tendermint/tendermint/crypto/tmhash" | |
| tmrand "github.com/tendermint/tendermint/libs/rand" | |
| tmcrypto "github.com/tendermint/tendermint/crypto" | |
| "github.com/tendermint/tendermint/crypto/merkle" | |
| tmrand "github.com/tendermint/tendermint/libs/rand" |
creachadair
reviewed
May 10, 2022
| func FuzzProofsFromByteSlices(f *testing.F) { | ||
| seeds := [][]byte{ | ||
| nil, | ||
| []byte{}, |
creachadair
reviewed
May 10, 2022
| total := 100 | ||
| seed := make([][]byte, total) | ||
| for j := 0; j < total; j++ { | ||
| seed[j] = tmrand.Bytes(tmhash.Size) |
There was a problem hiding this comment.
Suggested change
| seed[j] = tmrand.Bytes(tmhash.Size) | |
| seed[j] = tmrand.Bytes(tmcrypto.HashSize) |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Contributor
Author
|
@creachadair @marbar3778 could y'all please help me reopen this PR? I was on vacation and github-actions bot closed this PR. Thank you. |
samricotta
pushed a commit
that referenced
this pull request
Aug 9, 2022
samricotta
pushed a commit
that referenced
this pull request
Aug 12, 2022
samricotta
pushed a commit
that referenced
this pull request
Aug 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a fuzzer to exorcise merkle.ProofsFromByteSlices.