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
fuzzing core/state package without skip slot cache #4883
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4883 +/- ##
==========================================
+ Coverage 46.34% 55.64% +9.29%
==========================================
Files 207 254 +47
Lines 15703 18900 +3197
==========================================
+ Hits 7277 10516 +3239
+ Misses 7286 6809 -477
- Partials 1140 1575 +435 |
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.
Thanks @shayzluf these are excellent finds and good nil protection
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.
one comment on error log
beacon-chain/core/state/state.go
Outdated
@@ -65,6 +65,9 @@ func GenesisBeaconState(deposits []*ethpb.Deposit, genesisTime uint64, eth1Data | |||
// Process initial deposits. | |||
leaves := [][]byte{} | |||
for _, deposit := range deposits { | |||
if deposit == nil || deposit.Data == nil { | |||
return nil, errors.New("eth1data contains nil or deposits with nil data field") |
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.
shouldn't this just be deposits? where is eth1data?
PTAL @terencechain |
thanks @rauljordan |
…into fuzz_state_no_cache
…te_no_cache # Conflicts: # beacon-chain/state/getters.go
@prestonvanloon PTAL |
var chainStartDepositCount, currentTime uint64 | ||
for i := 0; i < 100000; i++ { | ||
fuzzer.Fuzz(&chainStartDepositCount) | ||
fuzzer.Fuzz(&chainStartDepositCount) |
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.
Why twice?
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.
by mistake
fuzzer.Fuzz(&chainStartDepositCount) | |
fuzzer.Fuzz(¤tTime) |
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.
thanks!
* fuzzing core/state package * named error msg * err comment * terence feedback * preston feedback * preston feedback Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* fuzzing core/state package * named error msg * err comment * terence feedback * preston feedback * preston feedback Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
[Part of] #4882
Description
Fuzz test state package and fix errors that have been caught
will include skip slot cache in another pr