Skip to content
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

Data Structures and Changes Related to EIP-7251 #12418

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
6 changes: 5 additions & 1 deletion cl/abstract/beacon_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/erigontech/erigon/cl/cltypes/solid"
)

//go:generate mockgen -typed=true -destination=./mock_services/beacon_state_mock.go -package=mock_services . BeaconState
type BeaconState interface {
BeaconStateBasic
BeaconStateExtension
Expand Down Expand Up @@ -58,6 +59,7 @@ type BeaconStateExtension interface {
PreviousStateRoot() common.Hash
SetPreviousStateRoot(root common.Hash)
GetValidatorActivationChurnLimit() uint64
GetPendingPartialWithdrawals() *solid.ListSSZ[*solid.PendingPartialWithdrawal]
}

type BeaconStateBasic interface {
Expand Down Expand Up @@ -122,7 +124,8 @@ type BeaconStateMutator interface {
SetValidatorInactivityScore(index int, score uint64) error
SetCurrentEpochParticipationFlags(flags []cltypes.ParticipationFlags)
SetPreviousEpochParticipationFlags(flags []cltypes.ParticipationFlags)
SetPreviousEpochAttestations(attestations *solid.ListSSZ[*solid.PendingAttestation]) // temporarily skip this mock
SetPreviousEpochAttestations(attestations *solid.ListSSZ[*solid.PendingAttestation])
SetPendingPartialWithdrawals(*solid.ListSSZ[*solid.PendingPartialWithdrawal])

AddEth1DataVote(vote *cltypes.Eth1Data)
AddValidator(validator solid.Validator, balance uint64)
Expand All @@ -136,6 +139,7 @@ type BeaconStateMutator interface {
AddPreviousEpochAttestation(attestation *solid.PendingAttestation)

AppendValidator(in solid.Validator)
AppendPendingDeposit(deposit *solid.PendingDeposit)

ResetEth1DataVotes()
ResetEpochParticipation()
Expand Down
Loading
Loading