@@ -13,6 +13,7 @@ type VersionedBeaconStateTopLevelRoots struct {
1313 Version spec.DataVersion
1414 Deneb * BeaconStateTopLevelRootsDeneb
1515 Electra * BeaconStateTopLevelRootsElectra
16+ Fulu * BeaconStateTopLevelRootsFulu
1617}
1718
1819func (v * VersionedBeaconStateTopLevelRoots ) GetBalancesRoot () (* phase0.Root , error ) {
@@ -21,6 +22,8 @@ func (v *VersionedBeaconStateTopLevelRoots) GetBalancesRoot() (*phase0.Root, err
2122 return v .Deneb .BalancesRoot , nil
2223 case spec .DataVersionElectra :
2324 return v .Electra .BalancesRoot , nil
25+ case spec .DataVersionFulu :
26+ return v .Fulu .BalancesRoot , nil
2427 default :
2528 return nil , errors .New ("unsupported beacon state version" )
2629 }
@@ -97,6 +100,47 @@ type BeaconStateTopLevelRootsElectra struct {
97100 PendingConsolidationsRoot * phase0.Root
98101}
99102
103+ type BeaconStateTopLevelRootsFulu struct {
104+ GenesisTimeRoot * phase0.Root
105+ GenesisValidatorsRoot * phase0.Root
106+ SlotRoot * phase0.Root
107+ ForkRoot * phase0.Root
108+ LatestBlockHeaderRoot * phase0.Root
109+ BlockRootsRoot * phase0.Root
110+ StateRootsRoot * phase0.Root
111+ HistoricalRootsRoot * phase0.Root
112+ ETH1DataRoot * phase0.Root
113+ ETH1DataVotesRoot * phase0.Root
114+ ETH1DepositIndexRoot * phase0.Root
115+ ValidatorsRoot * phase0.Root
116+ BalancesRoot * phase0.Root
117+ RANDAOMixesRoot * phase0.Root
118+ SlashingsRoot * phase0.Root
119+ PreviousEpochParticipationRoot * phase0.Root
120+ CurrentEpochParticipationRoot * phase0.Root
121+ JustificationBitsRoot * phase0.Root
122+ PreviousJustifiedCheckpointRoot * phase0.Root
123+ CurrentJustifiedCheckpointRoot * phase0.Root
124+ FinalizedCheckpointRoot * phase0.Root
125+ InactivityScoresRoot * phase0.Root
126+ CurrentSyncCommitteeRoot * phase0.Root
127+ NextSyncCommitteeRoot * phase0.Root
128+ LatestExecutionPayloadHeaderRoot * phase0.Root
129+ NextWithdrawalIndexRoot * phase0.Root
130+ NextWithdrawalValidatorIndexRoot * phase0.Root
131+ HistoricalSummariesRoot * phase0.Root
132+ DepositRequestsStartIndexRoot * phase0.Root
133+ DepositBalanceToConsumeRoot * phase0.Root
134+ ExitBalanceToConsumeRoot * phase0.Root
135+ EarliestExitEpochRoot * phase0.Root
136+ ConsolidationBalanceToConsumeRoot * phase0.Root
137+ EarliestConsolidationEpochRoot * phase0.Root
138+ PendingDepositsRoot * phase0.Root
139+ PendingPartialWithdrawalsRoot * phase0.Root
140+ PendingConsolidationsRoot * phase0.Root
141+ ProposerLookaheadRoot * phase0.Root
142+ }
143+
100144func ProveBeaconTopLevelRootAgainstBeaconState (beaconTopLevelRoots * VersionedBeaconStateTopLevelRoots , index uint64 ) (common.Proof , error ) {
101145 var v reflect.Value
102146 var treeHeight uint64
@@ -107,6 +151,9 @@ func ProveBeaconTopLevelRootAgainstBeaconState(beaconTopLevelRoots *VersionedBea
107151 case spec .DataVersionElectra :
108152 v = reflect .ValueOf (* beaconTopLevelRoots .Electra )
109153 treeHeight = BEACON_STATE_TREE_HEIGHT_ELECTRA
154+ case spec .DataVersionFulu :
155+ v = reflect .ValueOf (* beaconTopLevelRoots .Fulu )
156+ treeHeight = BEACON_STATE_TREE_HEIGHT_FULU
110157 default :
111158 return nil , errors .New ("unsupported beacon state version" )
112159 }
0 commit comments