Files
prysm/beacon-chain/state/state-native/getters_proposer_lookahead.go
Potuz f8b88db1a4 EIP 7917 (#15129)
* Add the new Fulu state with the new field

* fix the hasher for the fulu state

* Fix ToProto() and ToProtoUnsafe()

* Add the fields as shared

* Add epoch transition code

* short circuit the proposer cache to use the state

* Marshal the state JSON

* update spectests to 1.6.0-alpha.1

* Remove deneb and electra entries from blob schedule

This was cherry picked from PR #15364
and edited to remove the minimal cases

* Fix minimal tests

* Increase deadling for processing blocks in spectests

* Preston's review

* review

---------

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2025-06-12 20:40:34 +00:00

20 lines
584 B
Go

package state_native
import (
"slices"
"github.com/OffchainLabs/prysm/v6/consensus-types/primitives"
"github.com/OffchainLabs/prysm/v6/runtime/version"
)
// ProposerLookahead is a non-mutating call to the beacon state which returns a slice of
// validator indices that hold the proposers in the next few slots.
func (b *BeaconState) ProposerLookahead() ([]primitives.ValidatorIndex, error) {
if b.version < version.Fulu {
return nil, errNotSupported("ProposerLookahead", b.version)
}
b.lock.RLock()
defer b.lock.RUnlock()
return slices.Clone(b.proposerLookahead), nil
}