mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
cebb62997d
* Add AFL third_party libraries * add beacon state fuzzing, add afl fuzz bundle * rm fuzzing engine * fix and lint * Check for array out of bounds when calculating proposer delta * failing test * fix * Checkpoint progress * Add requirement that inclusion distance is not zero, add regression test * No need for HTR since that is covered in process slots * Removing some fuzzit logic, old fuzz tests * Add ssz encoder test and fix * Fuzzing checkpoint, adding fuzzing to the p2p layer * ignore some libfuzzer files * Full testing of p2p processing of blocks, with some mocked stuff * use tmpdir and always process blocks * use checkptr * Update ethereumapis * go mod tidy * benchmarks for ferran's fast ssz hash tree root * Update fastssz * fmt * gaz * goimports * Fix * fix ethereumapis * fix again * kafka * fix gen file * fix compute signing root * gofmt * checkpoint progress * progress * checkpoint * updates * updates * merge fix * WIP * merge * fix build * fix merge related issues * cleanup * revert unrelated * lint * lint * lint * manual tags for fuzz * Commentary on upload script * some import fixes, but not all * fix //fuzz:fuzz_tests * rm unused test * update generated ssz * Set // +build libfuzzer * remove debug code * A bit of refactoring ot explain why there is a committee_disabled file Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
51 lines
1.8 KiB
Go
51 lines
1.8 KiB
Go
// +build libfuzzer
|
|
|
|
// This file is used in fuzzer builds to bypass global committee caches.
|
|
package cache
|
|
|
|
// FakeCommitteeCache is a struct with 1 queue for looking up shuffled indices list by seed.
|
|
type FakeCommitteeCache struct {
|
|
}
|
|
|
|
// NewCommitteesCache creates a new committee cache for storing/accessing shuffled indices of a committee.
|
|
func NewCommitteesCache() *FakeCommitteeCache {
|
|
return &FakeCommitteeCache{}
|
|
}
|
|
|
|
// Committee fetches the shuffled indices by slot and committee index. Every list of indices
|
|
// represent one committee. Returns true if the list exists with slot and committee index. Otherwise returns false, nil.
|
|
func (c *FakeCommitteeCache) Committee(slot uint64, seed [32]byte, index uint64) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// AddCommitteeShuffledList adds Committee shuffled list object to the cache. T
|
|
// his method also trims the least recently list if the cache size has ready the max cache size limit.
|
|
func (c *FakeCommitteeCache) AddCommitteeShuffledList(committees *Committees) error {
|
|
return nil
|
|
}
|
|
|
|
// AddProposerIndicesList updates the committee shuffled list with proposer indices.
|
|
func (c *FakeCommitteeCache) AddProposerIndicesList(seed [32]byte, indices []uint64) error {
|
|
return nil
|
|
}
|
|
|
|
// ActiveIndices returns the active indices of a given seed stored in cache.
|
|
func (c *FakeCommitteeCache) ActiveIndices(seed [32]byte) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// ActiveIndicesCount returns the active indices count of a given seed stored in cache.
|
|
func (c *FakeCommitteeCache) ActiveIndicesCount(seed [32]byte) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
// ProposerIndices returns the proposer indices of a given seed.
|
|
func (c *FakeCommitteeCache) ProposerIndices(seed [32]byte) ([]uint64, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HasEntry returns true if the committee cache has a value.
|
|
func (c *FakeCommitteeCache) HasEntry(string) bool {
|
|
return false
|
|
}
|