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 support #63

Merged
merged 108 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
451f9a2
Initial electra support
pk910 May 7, 2024
8e75a22
trigger ci
pk910 May 7, 2024
c71ec27
bump `go-eth2-client` override and fixed attestation slashing handling
pk910 May 7, 2024
fef53d5
Merge branch 'master' into electra-support
pk910 May 8, 2024
c31aed6
bump `go-eth2-client` override & enable dynamic ssz parsing for minim…
pk910 May 8, 2024
0827cae
bump `go-eth2-client` override
pk910 May 8, 2024
1357531
index consolidations & display on slot details page
pk910 May 12, 2024
e29d856
Merge branch 'master' into electra-support
pk910 May 13, 2024
e7d3458
fix block consolidations on `slot` details page
pk910 May 13, 2024
0744ccf
bump `go-eth2-client` overrides
pk910 May 14, 2024
ab314f5
bump ``go-eth2-client override
pk910 May 14, 2024
c37ce24
add elecra related things to slots details page (DepositReceipts, Wit…
pk910 May 15, 2024
4ffd3b5
fix slots details page
pk910 May 15, 2024
e562aa4
fix
pk910 May 15, 2024
8ebd8ee
fix withdrawal requests tab
pk910 May 15, 2024
caef02e
Merge branch 'master' into electra-support
pk910 Jun 13, 2024
516d819
Merge branch 'master' into electra-support
pk910 Jun 14, 2024
493c175
update schema for new pectra types & prepare el requests tracking
pk910 Jun 15, 2024
34d2277
fix block extra data helper for electra
pk910 Jun 15, 2024
dedd914
prepared el request indexing & added filtered requests page (`/valida…
pk910 Jun 15, 2024
65b07d1
Merge branch 'master' into electra-support
pk910 Jun 17, 2024
e0e34cf
Merge branch 'master' into electra-support
pk910 Jun 18, 2024
6086337
fix attestation aggregation with minimal preset
pk910 Jun 20, 2024
ae07dd9
Merge branch 'master' into electra-support
pk910 Jun 24, 2024
b5bd20f
bump `go-eth2-client` override for devnet1 compatibility
pk910 Jul 1, 2024
4989982
bump `go-eth2-client` override
pk910 Jul 1, 2024
a50ec50
fix electra SSZ marshalling
pk910 Jul 1, 2024
93aed0b
Merge branch 'master' into electra-support
pk910 Jul 9, 2024
3c4f151
bump `go-eth2-client` override
pk910 Jul 9, 2024
dcf5d88
Merge branch 'master' into electra-support
pk910 Jul 11, 2024
8971db4
show consolidation requests on slot details page
pk910 Jul 12, 2024
a18b6d2
Merge branch 'master' into electra-support
pk910 Jul 17, 2024
fbf266b
fix issue in sql schema
pk910 Jul 23, 2024
430e7d3
fix panic in `UnmarshalVersionedSignedBeaconBlockSSZ`
pk910 Jul 23, 2024
92adfcb
Merge branch 'master' into electra-support
pk910 Jul 24, 2024
94a31e1
listen to head event for canonical chain tracking to avoid dora from …
pk910 Jul 28, 2024
0761ef8
Bump the dependencies group with 4 updates
dependabot[bot] Jul 22, 2024
3d123fc
copy consensus & execution pool logic from assertoor
pk910 Jul 28, 2024
33a0845
simplify consensus pool logic (remove block processing)
pk910 Jul 28, 2024
b5cdedf
start implementation of new indexer logic
pk910 Jul 28, 2024
1e92a08
continued indexer implementation
pk910 Jul 28, 2024
a9b71b6
implement epoch status processing, compute duties from state
pk910 Jul 29, 2024
a991f4d
small fixes
pk910 Jul 29, 2024
14ac3dc
continue indexer implementation
pk910 Jul 30, 2024
d169de4
Merge branch 'master' into indexer-reimplementation
pk910 Jul 30, 2024
7dda976
continued indexer implementation
pk910 Jul 30, 2024
6b65b5e
add fork detection & tracking
pk910 Jul 30, 2024
6f81d7f
improve fork detection
pk910 Jul 30, 2024
2883219
small fixes
pk910 Jul 30, 2024
e33a07f
cleanup & comments
pk910 Jul 31, 2024
38778c7
bump go to 1.22
pk910 Jul 31, 2024
a2ef656
continued indexer implementation, added finalization processing
pk910 Jul 31, 2024
bf484d5
various indexer fixes
pk910 Jul 31, 2024
4c3e6cc
small fixes for fork detection
pk910 Jul 31, 2024
75a3d16
fixed voting aggregation
pk910 Jul 31, 2024
e567fad
improved finalization processing & fork detection
pk910 Aug 1, 2024
d82a5ab
added sync committee processing & various fixes
pk910 Aug 1, 2024
630e494
precompute duties for next epoch based on parent epoch
pk910 Aug 1, 2024
b1f48d4
implemented pruning & epoch aggregation caching
pk910 Aug 2, 2024
f5d9679
various fixes, changed fork id numbering, added block compression
pk910 Aug 2, 2024
f2c5311
commit
pk910 Aug 4, 2024
5608807
simplified & hooked up execution pool logic
pk910 Aug 2, 2024
0951ddf
implemented synchronizer
pk910 Aug 2, 2024
758e49e
improved handling for concurrent state loading & pruning of the same …
pk910 Aug 3, 2024
14fe6d4
implemented canonical head selection logic
pk910 Aug 3, 2024
2f59d0f
move over UI bindings & reimplement chain service to use new indexer
pk910 Aug 4, 2024
48cc357
switch remaining pages to new indexer
pk910 Aug 4, 2024
f6e1366
various small fixes related to new indexer
pk910 Aug 5, 2024
a6b7ddc
memory usage improvements
pk910 Aug 5, 2024
dbefab6
remove slot assignments table
pk910 Aug 5, 2024
0cbbdfa
refactored deposit indexer & linked to new beacon indexer
pk910 Aug 5, 2024
a263faa
load blobs directly from rpc, no blob indexing
pk910 Aug 5, 2024
c969286
moved mev relay indexer & changes to use new indexer
pk910 Aug 5, 2024
b3fa5c6
remove old indexer
pk910 Aug 5, 2024
6b0c4e0
Merge branch 'electra-support' into indexer-reimplementation
pk910 Aug 5, 2024
16add84
removed old rpc code, fixed fork tracking
pk910 Aug 5, 2024
1d573fa
remove parent_fork ids from forks with finalized base block
pk910 Aug 5, 2024
315948e
add some docs & reduce memory for attester duties
pk910 Aug 5, 2024
a6e8fea
preload genesis state when started before genesis, fix duplicate gen…
pk910 Aug 5, 2024
d553bdf
fixes for minimal preset & for handling epoch 0 finalization/synchron…
pk910 Aug 6, 2024
0d64fda
add lru cache for epoch voting aggregations
pk910 Aug 6, 2024
3c253e6
Merge branch 'master' into electra-support
pk910 Aug 7, 2024
c1d50f7
Merge branch 'electra-support' into indexer-reimplementation
pk910 Aug 7, 2024
ee7b325
improve cache restore from DB
pk910 Aug 7, 2024
deed775
do not fetch peers for ethereumjs clients
pk910 Aug 7, 2024
7cc7412
do not create block filter for ethereumjs clients
pk910 Aug 7, 2024
541e851
exclude incomplete blocks from canonical head computation
pk910 Aug 7, 2024
f11cc6b
Merge branch 'electra-devnet-2' into indexer-reimplementation
pk910 Aug 7, 2024
fa5ec7b
properly index latest pectra structures (consolidation & withdrawal r…
pk910 Aug 7, 2024
632fccf
add lru cache for most recent validator sets
pk910 Aug 7, 2024
bb00e19
fix key for validator set cache
pk910 Aug 7, 2024
978d0a5
load peers from ethereumjs clients
pk910 Aug 8, 2024
2209b36
cleanup sql schema & fix genesis block synchronization
pk910 Aug 8, 2024
f50b9d8
add readme to add an overview of the indexer package
pk910 Aug 8, 2024
3cedab5
fix synchronizer error if no client is ready
pk910 Aug 9, 2024
b696962
Merge branch 'master' of github.com:ethpandaops/dora into electra-sup…
skylenet Aug 12, 2024
7749653
Merge pull request #83 from ethpandaops/indexer-reimplementation
pk910 Aug 12, 2024
7c87d1d
fix validator names service initialization
pk910 Aug 12, 2024
0256dee
add caplin client type
pk910 Aug 12, 2024
e6264f8
Merge branch 'master' into electra-support
pk910 Aug 15, 2024
4f569fe
Merge branch 'master' into electra-support
pk910 Aug 15, 2024
dc34d87
fix staticcheck error
pk910 Aug 15, 2024
e852342
fix spec comparison
pk910 Aug 15, 2024
d184c8f
show eip7702 transactions (fix #85)
pk910 Aug 15, 2024
5671fb9
add comments
pk910 Aug 15, 2024
85262ff
replace `beaconmath.go`with chainState calls
pk910 Aug 15, 2024
0127ead
drop aws support (no more blob persistence)
pk910 Aug 15, 2024
efb5e97
remove local chain config parser & common chain configs
pk910 Aug 15, 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
10 changes: 5 additions & 5 deletions .github/workflows/_shared-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

# setup project dependencies
- name: Get dependencies
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

# setup cross build libs
- name: Get cross build dependencies
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

# setup project dependencies
- name: Get dependencies
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

# setup project dependencies
- name: Get dependencies
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

# setup project dependencies
- name: Get dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_shared-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Verify dependencies
run: go mod verify
Expand Down
28 changes: 19 additions & 9 deletions .hack/devnet/kurtosis.devnet.config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
participants:
- el_type: geth
el_image: ethereum/client-go:stable
cl_type: lighthouse
cl_image: sigp/lighthouse:latest
count: 4
participants_matrix:
el:
- el_type: geth
el_image: ethpandaops/geth:lightclient-prague-devnet-1-37c4b03
cl:
- cl_type: lighthouse
cl_image: ethpandaops/lighthouse:electra-devnet-1-ba28217
- cl_type: teku
cl_image: ethpandaops/teku:master-2d2d17b
- cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:unstable-minimal-c0fc0f4
- cl_type: grandine
cl_image: ethpandaops/grandine:electra-minimal-b7bae2c
network_params:
seconds_per_slot: 12
additional_services: []
snooper_enabled: false
electra_fork_epoch: 5
min_validator_withdrawability_delay: 1
shard_committee_period: 1
preset: minimal
additional_services:
- dora
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build env
FROM golang:1.21 AS build-env
FROM golang:1.22 AS build-env
COPY go.mod go.sum /src/
WORKDIR /src
RUN go mod download
Expand Down
70 changes: 0 additions & 70 deletions aws/s3store.go

This file was deleted.

110 changes: 110 additions & 0 deletions clients/consensus/chainspec.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
package consensus

import (
"bytes"
"reflect"
"time"

"github.com/attestantio/go-eth2-client/spec/phase0"
)

type ForkVersion struct {
Epoch uint64
CurrentVersion []byte
PreviousVersion []byte
}

// https://github.com/ethereum/consensus-specs/blob/dev/configs/mainnet.yaml
type ChainSpec struct {
PresetBase string `yaml:"PRESET_BASE"`
ConfigName string `yaml:"CONFIG_NAME"`
MinGenesisTime time.Time `yaml:"MIN_GENESIS_TIME"`
GenesisForkVersion phase0.Version `yaml:"GENESIS_FORK_VERSION"`
AltairForkVersion phase0.Version `yaml:"ALTAIR_FORK_VERSION"`
AltairForkEpoch *uint64 `yaml:"ALTAIR_FORK_EPOCH"`
BellatrixForkVersion phase0.Version `yaml:"BELLATRIX_FORK_VERSION"`
BellatrixForkEpoch *uint64 `yaml:"BELLATRIX_FORK_EPOCH"`
CappellaForkVersion phase0.Version `yaml:"CAPELLA_FORK_VERSION"`
CappellaForkEpoch *uint64 `yaml:"CAPELLA_FORK_EPOCH"`
DenebForkVersion phase0.Version `yaml:"DENEB_FORK_VERSION"`
DenebForkEpoch *uint64 `yaml:"DENEB_FORK_EPOCH"`
ElectraForkVersion phase0.Version `yaml:"ELECTRA_FORK_VERSION"`
ElectraForkEpoch *uint64 `yaml:"ELECTRA_FORK_EPOCH"`
Eip7594ForkVersion phase0.Version `yaml:"EIP7594_FORK_VERSION"`
Eip7594ForkEpoch *uint64 `yaml:"EIP7594_FORK_EPOCH"`
SecondsPerSlot time.Duration `yaml:"SECONDS_PER_SLOT"`
SlotsPerEpoch uint64 `yaml:"SLOTS_PER_EPOCH"`
EpochsPerHistoricalVector uint64 `yaml:"EPOCHS_PER_HISTORICAL_VECTOR"`
EpochsPerSlashingVector uint64 `yaml:"EPOCHS_PER_SLASHINGS_VECTOR"`
EpochsPerSyncCommitteePeriod uint64 `yaml:"EPOCHS_PER_SYNC_COMMITTEE_PERIOD"`
MinSeedLookahead uint64 `yaml:"MIN_SEED_LOOKAHEAD"`
ShuffleRoundCount uint64 `yaml:"SHUFFLE_ROUND_COUNT"`
MaxEffectiveBalance uint64 `yaml:"MAX_EFFECTIVE_BALANCE"`
MaxEffectiveBalanceElectra uint64 `yaml:"MAX_EFFECTIVE_BALANCE_ELECTRA"`
TargetCommitteeSize uint64 `yaml:"TARGET_COMMITTEE_SIZE"`
MaxCommitteesPerSlot uint64 `yaml:"MAX_COMMITTEES_PER_SLOT"`
MinPerEpochChurnLimit uint64 `yaml:"MIN_PER_EPOCH_CHURN_LIMIT"`
ChurnLimitQuotient uint64 `yaml:"CHURN_LIMIT_QUOTIENT"`
DomainBeaconProposer phase0.DomainType `yaml:"DOMAIN_BEACON_PROPOSER"`
DomainBeaconAttester phase0.DomainType `yaml:"DOMAIN_BEACON_ATTESTER"`
DomainSyncCommittee phase0.DomainType `yaml:"DOMAIN_SYNC_COMMITTEE"`
SyncCommitteeSize uint64 `yaml:"SYNC_COMMITTEE_SIZE"`
DepositContractAddress []byte `yaml:"DEPOSIT_CONTRACT_ADDRESS"`

// additional dora specific specs
WhiskForkEpoch *uint64
}

var byteType = reflect.TypeOf(byte(0))

func (chain *ChainSpec) CheckMismatch(chain2 *ChainSpec) []string {
mismatches := []string{}

chainT := reflect.ValueOf(chain).Elem()
chain2T := reflect.ValueOf(chain2).Elem()

for i := 0; i < chainT.NumField(); i++ {
fieldV := chainT.Field(i)
field2V := chain2T.Field(i)

if fieldV.Type().Kind() == reflect.Ptr {
if !fieldV.IsNil() {
fieldV = fieldV.Elem()
}
if !field2V.IsNil() {
field2V = field2V.Elem()
}
}

if fieldV.Type().Kind() == reflect.Slice && fieldV.Type().Elem() == byteType {
// compare byte slices
bytesA := fieldV.Interface().([]byte)
bytesB := field2V.Interface().([]byte)

if !bytes.Equal(bytesA, bytesB) {
mismatches = append(mismatches, chainT.Type().Field(i).Name)
}
} else if fieldV.Interface() != field2V.Interface() {
if chainT.Field(i).Interface() == reflect.Zero(chainT.Field(i).Type()).Interface() {
// 0 value on chain side are allowed
continue
}
mismatches = append(mismatches, chainT.Type().Field(i).Name)
}
}

return mismatches
}

func (chain *ChainSpec) Clone() *ChainSpec {
res := &ChainSpec{}
chainT := reflect.ValueOf(chain).Elem()
chain2T := reflect.ValueOf(res).Elem()

for i := 0; i < chainT.NumField(); i++ {
value := chainT.Field(i)
chain2T.Field(i).Set(value)
}

return res
}
Loading
Loading