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

Electra hard fork #12418

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
fa9827d
try
domiwei Nov 1, 2024
99ed41e
new data fields in beacon_state
domiwei Oct 21, 2024
93e05fa
update
domiwei Oct 21, 2024
567ec37
update
domiwei Oct 21, 2024
266f871
initiate_validator_exit
domiwei Oct 22, 2024
2a2ffd2
update
domiwei Oct 22, 2024
6263d48
process_slashings
domiwei Oct 22, 2024
e7d08e8
misc and beacon state
domiwei Oct 22, 2024
99f7298
get_validator_from_deposit
domiwei Oct 23, 2024
e32382a
process deposit
domiwei Oct 23, 2024
6fd4664
update
domiwei Oct 23, 2024
2a4bb39
update
domiwei Oct 24, 2024
e1660d3
update
domiwei Oct 24, 2024
46cc866
update
domiwei Oct 24, 2024
42e9839
fix ut
domiwei Oct 24, 2024
30ae35f
fix ut
domiwei Oct 24, 2024
c3098e4
update
domiwei Oct 25, 2024
4d92dda
update
domiwei Oct 25, 2024
7f89271
execution request
domiwei Oct 30, 2024
0e3cf50
process pending deposit
domiwei Oct 31, 2024
d18e05d
update
domiwei Oct 31, 2024
d86e114
fix unittest
domiwei Nov 1, 2024
d3c95ee
pending consolidations
domiwei Nov 1, 2024
69542e9
process
domiwei Nov 3, 2024
9f9dca9
mock
domiwei Nov 4, 2024
a3df44b
process consolidations req
domiwei Nov 5, 2024
961eaaf
process operations
domiwei Nov 5, 2024
a0886ee
fork
domiwei Nov 6, 2024
8421f44
update
domiwei Nov 6, 2024
5b318ff
update
domiwei Nov 7, 2024
fa0dcbf
update
domiwei Nov 7, 2024
0fac305
update
domiwei Nov 8, 2024
2b1a17f
attestation service
domiwei Nov 8, 2024
5ef545b
update
domiwei Nov 9, 2024
901cb2e
update
domiwei Nov 9, 2024
00d3d2f
spectest
domiwei Nov 18, 2024
3448d2b
update
domiwei Nov 18, 2024
162ee8d
update
domiwei Nov 19, 2024
dca3367
update
domiwei Nov 20, 2024
4b9ba18
update
domiwei Nov 20, 2024
9f3f131
update
domiwei Nov 22, 2024
41a3c12
update
domiwei Nov 25, 2024
f97958c
update
domiwei Nov 25, 2024
dc85a14
update
domiwei Nov 25, 2024
0a3c1ce
update
domiwei Nov 25, 2024
ac8fe56
update
domiwei Nov 25, 2024
05386f5
update
domiwei Nov 25, 2024
89bc5a9
update
domiwei Nov 25, 2024
bfac63d
update
domiwei Nov 25, 2024
e8087b1
update
domiwei Nov 25, 2024
c837b92
bls_to_exec_change check
domiwei Nov 26, 2024
1b14069
fix upgrade
domiwei Nov 27, 2024
d2f8828
pass
domiwei Nov 27, 2024
eb6b730
skip whisk and eip7594
domiwei Nov 27, 2024
8d16daf
update
domiwei Nov 27, 2024
48162e0
update
domiwei Nov 27, 2024
b57e6e2
update
domiwei Nov 27, 2024
471a546
update
domiwei Nov 27, 2024
a44a4a4
update
domiwei Nov 27, 2024
7c1319a
update
domiwei Nov 27, 2024
1b537fa
update
domiwei Nov 28, 2024
e7cf408
update
domiwei Nov 28, 2024
88e089b
update for mekong
domiwei Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 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,14 @@ type BeaconStateExtension interface {
PreviousStateRoot() common.Hash
SetPreviousStateRoot(root common.Hash)
GetValidatorActivationChurnLimit() uint64
GetPendingPartialWithdrawals() *solid.ListSSZ[*solid.PendingPartialWithdrawal]
GetDepositBalanceToConsume() uint64
GetPendingDeposits() *solid.ListSSZ[*solid.PendingDeposit]
GetDepositRequestsStartIndex() uint64
GetPendingConsolidations() *solid.ListSSZ[*solid.PendingConsolidation]
GetEarlistConsolidationEpoch() uint64
ComputeExitEpochAndUpdateChurn(exitBalance uint64) uint64
GetConsolidationBalanceToConsume() uint64
}

type BeaconStateBasic interface {
Expand Down Expand Up @@ -122,7 +131,14 @@ 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])
SetPendingDeposits(*solid.ListSSZ[*solid.PendingDeposit])
SetDepositBalanceToConsume(uint64)
SetPendingConsolidations(consolidations *solid.ListSSZ[*solid.PendingConsolidation])
SetDepositRequestsStartIndex(uint64)
SetConsolidationBalanceToConsume(uint64)
SetEarlistConsolidationEpoch(uint64)

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

AppendValidator(in solid.Validator)
AppendPendingDeposit(deposit *solid.PendingDeposit)
AppendPendingPartialWithdrawal(withdrawal *solid.PendingPartialWithdrawal)
AppendPendingConsolidation(consolidation *solid.PendingConsolidation)

ResetEth1DataVotes()
ResetEpochParticipation()
Expand Down
Loading
Loading