Skip to content

Commit a14d6bd

Browse files
authored
feat: fusaka support (#184)
* feat: add fusaka support * chore: update readme * chore: remove local build
1 parent 48aceb3 commit a14d6bd

File tree

9 files changed

+628
-16
lines changed

9 files changed

+628
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ At all times, refer to the `mainnet`, `testnet`, and `preprod` git tags to under
99
| Environment | Version |
1010
| -------------- | ------------- |
1111
| Mainnet | [v1.5.2](https://github.com/Layr-Labs/eigenpod-proofs-generation/releases/tag/v1.5.2) |
12-
| Testnet(Hoodi & Holesky)| [v1.5.2](https://github.com/Layr-Labs/eigenpod-proofs-generation/releases/tag/v1.5.2) |
13-
| Preprod | [v1.5.2](https://github.com/Layr-Labs/eigenpod-proofs-generation/releases/tag/v1.5.2) |
12+
| Testnet(Hoodi & Holesky)| [v1.6.0](https://github.com/Layr-Labs/eigenpod-proofs-generation/releases/tag/v1.6.0) |
13+
| Preprod | [v1.6.0](https://github.com/Layr-Labs/eigenpod-proofs-generation/releases/tag/v1.6.0) |
1414

1515
# Introduction
1616

beacon/beacon_state_top_level_roots.go

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type VersionedBeaconStateTopLevelRoots struct {
1313
Version spec.DataVersion
1414
Deneb *BeaconStateTopLevelRootsDeneb
1515
Electra *BeaconStateTopLevelRootsElectra
16+
Fulu *BeaconStateTopLevelRootsFulu
1617
}
1718

1819
func (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+
100144
func 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
}

beacon/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const (
66
BEACON_BLOCK_HEADER_TREE_HEIGHT = uint64(3)
77
BEACON_STATE_TREE_HEIGHT_DENEB = uint64(5)
88
BEACON_STATE_TREE_HEIGHT_ELECTRA = uint64(6)
9+
BEACON_STATE_TREE_HEIGHT_FULU = uint64(6)
910
BALANCE_TREE_HEIGHT = uint64(38)
1011
VALIDATOR_TREE_HEIGHT = uint64(40)
1112

0 commit comments

Comments
 (0)