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

Ef tests electra #5758

Merged
merged 325 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
325 commits
Select commit Hold shift + click to select a range
be9c4bb
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 10, 2024
809db25
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 10, 2024
7d7f1c9
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 10, 2024
7926afe
Merge pull request #5749 from sigp/electra_op_pool
realbigsean May 10, 2024
89e4de9
don't fail on empty consolidations
realbigsean May 10, 2024
f60eac6
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean May 10, 2024
677a94d
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean May 10, 2024
9bd430b
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 10, 2024
4b28872
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 10, 2024
e616ae0
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 10, 2024
3ab1eb7
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 10, 2024
e1dcfb6
update committee offset
realbigsean May 11, 2024
b819d2d
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean May 11, 2024
40c4c00
update committee offset
realbigsean May 11, 2024
5364ba5
update committee offset
realbigsean May 11, 2024
9a22eb8
update committee offset
realbigsean May 11, 2024
879966e
update committee offset
realbigsean May 11, 2024
bf167c3
update committee offset
realbigsean May 11, 2024
817d423
only increment deposit index on state for old deposit flow
realbigsean May 11, 2024
5f09453
Revert "only increment deposit index on state for old deposit flow"
realbigsean May 11, 2024
a97e86c
only increment the state deposit index on old deposit flow
realbigsean May 11, 2024
261551e
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean May 11, 2024
518a91a
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
1ab786a
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
78e592a
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
61a247a
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 11, 2024
1e011da
read electra payloads from file
realbigsean May 11, 2024
a7a8d2b
accept new payload v4 in mock el
realbigsean May 11, 2024
4041cb9
use correct max eb in epoch cache initialization
realbigsean May 11, 2024
740494f
drop initiate validator ordering optimization
realbigsean May 11, 2024
25b1992
fix initiate exit for single pass
realbigsean May 11, 2024
a75257f
use correct max eb in epoch cache initialization
realbigsean May 11, 2024
f4907ef
drop initiate validator ordering optimization
realbigsean May 11, 2024
75f22ee
fix initiate exit for single pass
realbigsean May 11, 2024
28cf796
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
fc2c942
accept new payload v4 in mock el
realbigsean May 11, 2024
b8dc628
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
f9e0b4e
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 11, 2024
7a0057b
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 11, 2024
d7cc47c
fix genesis from eth1 for electra
realbigsean May 12, 2024
3b1fb0a
Fix Electra Fork Choice Tests (#5764)
ethDreamer May 12, 2024
8d4a921
add new operation tests
realbigsean May 12, 2024
6b7b7aa
Fix Electra Fork Choice Tests (#5764)
ethDreamer May 12, 2024
af7ba6f
Fix Electra Fork Choice Tests (#5764)
ethDreamer May 12, 2024
aaf8e50
Fix Electra Fork Choice Tests (#5764)
ethDreamer May 12, 2024
89ef043
add epoch processing new tests
realbigsean May 12, 2024
c900a88
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean May 12, 2024
97e88dd
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean May 12, 2024
67ba04e
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
179324b
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
f95c2dc
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
cbc01ad
Merge branch 'ef-tests-electra' of https://github.com/sigp/lighthouse…
realbigsean May 12, 2024
4cc926f
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 12, 2024
e061e18
fix ef test compilation
realbigsean May 12, 2024
c37a456
disable and enable ef test for epoch processing appropriately
realbigsean May 12, 2024
d781420
add consolidations to merkle calc for inclusion proof
realbigsean May 12, 2024
b7d983d
fix should_override_fc tests
ethDreamer May 12, 2024
87ec2e0
Merge branch 'ef-tests-electra' of https://github.com/sigp/lighthouse…
realbigsean May 12, 2024
2460a59
get ssz tests compiling
realbigsean May 12, 2024
4094d9a
ssz merkle validity for only deneb
realbigsean May 12, 2024
172353d
im dumb af
ethDreamer May 12, 2024
dff44b3
Merge remote-tracking branch 'upstream/ef-tests-electra' into ef-test…
ethDreamer May 12, 2024
affdccd
enable tests
realbigsean May 12, 2024
217fa9f
Fix Consolidation Sigs & Withdrawals
ethDreamer May 12, 2024
793764f
Merge pull request #5766 from ethDreamer/two_fixes
realbigsean May 12, 2024
c53d4ac
Merge branches 'block-processing-electra' and 'electra-epoch-proc' of…
realbigsean May 12, 2024
5f73d31
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
812b3d7
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
4240af9
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 12, 2024
caf0026
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 12, 2024
657887f
comment out consolidation operation ef tests until they are added
realbigsean May 12, 2024
9c33a6f
add signed consolidation ssz tests
realbigsean May 13, 2024
75f6f78
add as_iter to all List and Vector fields in the beacon state
realbigsean May 13, 2024
ac2e03b
remove dbg
realbigsean May 13, 2024
c680164
Send unagg attestation based on fork
pawanjay176 May 13, 2024
f3584e8
Merge branch 'beacon-api-electra' into p2p-electra
pawanjay176 May 13, 2024
cf0437b
Merge branch 'p2p-electra' into ef-tests-electra
pawanjay176 May 13, 2024
d9200a9
Fix Epoch Processing Consolidations
ethDreamer May 13, 2024
7e57ab3
Fix Final Spec Tests!
ethDreamer May 13, 2024
7f54906
Fix ser/de
pawanjay176 May 14, 2024
8468937
Merge branch 'electra-engine-api' into beacon-api-electra
pawanjay176 May 14, 2024
69738ce
Merge branch 'beacon-api-electra' into p2p-electra
pawanjay176 May 14, 2024
af0d601
Merge branch 'p2p-electra' into ef-tests-electra
pawanjay176 May 14, 2024
dfcce10
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
01dc321
cargo fmt
realbigsean May 15, 2024
f1fb033
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
2629393
cargo fmt
realbigsean May 15, 2024
8506fb0
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
ec055f4
cargo fmt
realbigsean May 15, 2024
4f0ecf2
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
227aa4b
cargo fmt
realbigsean May 15, 2024
fc15736
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
d8941d7
cargo fmt
realbigsean May 15, 2024
0c29896
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
210ad2f
cargo fmt
realbigsean May 15, 2024
79a5f25
Subscribe to the correct subnets for electra attestations (#5782)
eserilev May 15, 2024
a8088f1
cargo fmt
realbigsean May 15, 2024
8e537d1
update electra readiness with new endpoints
realbigsean May 15, 2024
37bcba2
don't block mev boost till genesis finalization
realbigsean May 15, 2024
a2c7838
Publish all aggregates
ethDreamer May 15, 2024
b5333b4
just one more check bro plz..
ethDreamer May 15, 2024
d197a19
Fix Bug In Block Processing with 0x02 Credentials
ethDreamer May 16, 2024
bafb5f0
fix slashing handling
realbigsean May 17, 2024
f9c50bc
Fix Bug In Block Processing with 0x02 Credentials
ethDreamer May 16, 2024
987abe0
Merge remote-tracking branch 'upstream/unstable'
ethDreamer May 24, 2024
82858bc
Send unagg attestation based on fork
pawanjay176 May 13, 2024
154b7a7
Publish all aggregates
ethDreamer May 15, 2024
bb734af
just one more check bro plz..
ethDreamer May 15, 2024
469296b
Merge pull request #5832 from ethDreamer/electra_attestation_changes_…
realbigsean May 24, 2024
3f169ef
Merge pull request #5835 from realbigsean/fix-validator-logic
realbigsean May 24, 2024
3e10e68
Merge pull request #5816 from realbigsean/electra-attestation-slashin…
realbigsean May 24, 2024
9440c36
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean May 24, 2024
57b6a9a
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean May 24, 2024
1aa410c
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 24, 2024
36a7b12
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 24, 2024
b33a343
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 24, 2024
759ad02
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 24, 2024
7192f00
Rename deploy block electra (#5853)
pawanjay176 May 28, 2024
aed25c4
fix: serde rename camle case for execution payload body (#5846)
mattsse May 28, 2024
72abfa4
Merge branch 'electra-engine-api' into beacon-api-electra
pawanjay176 May 28, 2024
4a8193e
Merge branch 'beacon-api-electra' into p2p-electra
pawanjay176 May 28, 2024
e943bda
Merge branch 'p2p-electra' into ef-tests-electra
pawanjay176 May 28, 2024
75432e1
Electra attestation changes rm decode impl (#5856)
ethDreamer May 30, 2024
e340998
Fix failing attestation tests and misc electra attestation cleanup (#…
eserilev May 30, 2024
b61d244
fix some todos (#5817)
realbigsean May 30, 2024
49de63f
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean May 31, 2024
29ed1c5
add consolidations to merkle calc for inclusion proof
realbigsean May 12, 2024
a647a36
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean May 31, 2024
4013944
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean May 31, 2024
7d3a5df
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean May 31, 2024
7a408b7
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean May 31, 2024
f4c7688
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean May 31, 2024
bd86762
Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into…
realbigsean May 31, 2024
f9d3545
Remove Duplicate KZG Commitment Merkle Proof Code (#5874)
ethDreamer Jun 1, 2024
77c630b
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jun 13, 2024
f25531d
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean Jun 13, 2024
772ab53
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean Jun 13, 2024
49db91b
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
c2c2baf
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
8a7662b
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
b21b108
fix compile
realbigsean Jun 13, 2024
8dc9f38
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean Jun 13, 2024
c43d1c2
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean Jun 13, 2024
f57fa87
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
a5ee0ed
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
9c9fc62
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jun 13, 2024
35e07eb
Fix slasher tests (#5906)
pawanjay176 Jun 14, 2024
d7f3c95
Update superstruct to 0.8
michaelsproul Jun 14, 2024
d5aa2d8
Merge remote-tracking branch 'origin/unstable' into electra_attestati…
michaelsproul Jun 14, 2024
c4f2284
Small cleanup in slasher tests
michaelsproul Jun 14, 2024
3ac3ddb
Clean up Electra observed aggregates (#5929)
michaelsproul Jun 17, 2024
9a01b6b
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jun 17, 2024
d87541c
De-dup attestation constructor logic
dapplion Jun 17, 2024
dd0d5e2
Remove unwraps in Attestation construction
dapplion Jun 17, 2024
3ec21a2
Dedup match_attestation_data
dapplion Jun 17, 2024
795eff9
Remove outdated TODO
dapplion Jun 17, 2024
960f8c5
Use ForkName Ord in fork-choice tests
dapplion Jun 17, 2024
1d0e3f4
Use ForkName Ord in BeaconBlockBody
dapplion Jun 17, 2024
5acc052
Make to_electra not fallible
dapplion Jun 17, 2024
4f08f6e
Remove TestRandom impl for IndexedAttestation
dapplion Jun 17, 2024
f049285
Remove IndexedAttestation faulty Decode impl
dapplion Jun 17, 2024
5070ab2
Drop TestRandom impl
dapplion Jun 17, 2024
45d007a
Add PendingAttestationInElectra
dapplion Jun 17, 2024
9e84779
Indexed att on disk (#35)
realbigsean Jun 18, 2024
7af3f2e
add electra fork enabled fn to ForkName impl (#36)
eserilev Jun 18, 2024
2634a1f
Update common/eth2/src/types.rs
dapplion Jun 18, 2024
dec7cff
Dedup attestation constructor logic in attester cache
dapplion Jun 17, 2024
6a4d842
Use if let Ok for committee_bits
dapplion Jun 18, 2024
6f0b784
Dedup Attestation constructor code
dapplion Jun 18, 2024
444cd62
Diff reduction in tests
dapplion Jun 18, 2024
d264736
Fix beacon_chain tests
dapplion Jun 18, 2024
7521f97
Diff reduction
dapplion Jun 18, 2024
4d3edfe
Use Ord for ForkName in pubsub
dapplion Jun 18, 2024
7fce143
Resolve into_attestation_and_indices todo
dapplion Jun 18, 2024
4d4c268
Remove stale TODO
dapplion Jun 18, 2024
370d511
Fix beacon_chain tests
dapplion Jun 18, 2024
cbb7c5d
Test spec invariant
dapplion Jun 19, 2024
70a2d4d
Use electra_enabled in pubsub
dapplion Jun 19, 2024
9e6e76f
Remove get_indexed_attestation_from_signed_aggregate
dapplion Jun 19, 2024
a8d8989
Use ok_or instead of if let else
dapplion Jun 19, 2024
d67270f
committees are sorted
dapplion Jun 19, 2024
3977b92
remove dup method `get_indexed_attestation_from_committees`
realbigsean Jun 19, 2024
6e44832
Merge pull request #5940 from dapplion/electra_attestation_changes_li…
realbigsean Jun 19, 2024
afb9122
update default persisted op pool deserialization
realbigsean Jun 19, 2024
381bbab
ensure aggregate and proof uses serde untagged on ref
realbigsean Jun 19, 2024
0e2add2
Fork aware ssz static attestation tests
dapplion Jun 20, 2024
f85a124
Electra attestation changes from Lions review (#5971)
eserilev Jun 20, 2024
efb8a01
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jun 20, 2024
dd0aa8e
Merge branch 'electra_attestation_changes' of https://github.com/sigp…
realbigsean Jun 20, 2024
536c9f8
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean Jun 20, 2024
c276af6
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean Jun 20, 2024
af98e98
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean Jun 20, 2024
b25471c
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jun 20, 2024
09f48c5
Fix Compilation Break
ethDreamer Jun 20, 2024
68035eb
Merge pull request #5973 from ethDreamer/beacon-api-electra
realbigsean Jun 20, 2024
8683bf7
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jun 20, 2024
27ed90e
Electra attestation changes sean review (#5972)
realbigsean Jun 21, 2024
b6913ae
Avoid changing slasher schema for Electra
michaelsproul Jun 21, 2024
ebbb17b
Delete slasher schema v4
michaelsproul Jun 21, 2024
13b1b05
Fix clippy
michaelsproul Jun 21, 2024
339d1b8
Fix compilation of beacon_chain tests
michaelsproul Jun 21, 2024
70a80d5
Update database.rs
dapplion Jun 21, 2024
7509cf6
Update per_block_processing.rs
dapplion Jun 21, 2024
8715589
Add electra lightclient types
dapplion Jun 21, 2024
09141ec
Update slasher/src/database.rs
realbigsean Jun 21, 2024
8fc5333
fix imports
realbigsean Jun 21, 2024
5517c78
Merge pull request #5980 from dapplion/electra-lightclient
realbigsean Jun 21, 2024
cf030d0
Merge pull request #5975 from michaelsproul/electra-slasher-no-migration
realbigsean Jun 21, 2024
68fd7a7
Update beacon_node/beacon_chain/src/attestation_verification.rs
realbigsean Jun 21, 2024
d137881
Update beacon_node/beacon_chain/src/attestation_verification.rs
realbigsean Jun 21, 2024
87fde51
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jun 25, 2024
a8d84d6
Merge branch 'electra_attestation_changes' of https://github.com/real…
realbigsean Jun 25, 2024
51a8c80
Merge branch 'block-processing-electra' of https://github.com/sigp/li…
realbigsean Jun 25, 2024
4a858b3
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthou…
realbigsean Jun 25, 2024
897f06a
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean Jun 25, 2024
cae0294
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jun 25, 2024
7d243f9
clean up enabled and disabled fork logic in ef tests
realbigsean Jun 25, 2024
86af440
add light client ssz tests
realbigsean Jun 26, 2024
6e98954
disable failing light client ssz tests
realbigsean Jun 26, 2024
50d0b2f
correctly exclude light client struct from accessed files
realbigsean Jun 26, 2024
806a5eb
The great renaming receipt -> request
pawanjay176 Jun 28, 2024
033457c
Address some more review comments
pawanjay176 Jun 28, 2024
257bcc3
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jul 1, 2024
c9fe10b
Update beacon_node/beacon_chain/src/electra_readiness.rs
realbigsean Jul 1, 2024
69ac342
Update consensus/types/src/chain_spec.rs
realbigsean Jul 1, 2024
6766f32
update GET requests
realbigsean Jul 8, 2024
39d41ad
update POST requests
realbigsean Jul 8, 2024
f405601
add client updates and test updates
realbigsean Jul 9, 2024
0c2ee92
Merge branch 'unstable' of https://github.com/sigp/lighthouse into el…
realbigsean Jul 9, 2024
dabb3d1
Merge branch 'electra-engine-api' of https://github.com/sigp/lighthou…
realbigsean Jul 9, 2024
80266a8
compile after merge
realbigsean Jul 9, 2024
d1357e4
unwrap -> unwrap_err
realbigsean Jul 9, 2024
d394746
self review
realbigsean Jul 9, 2024
c4cb8ad
fix tests
realbigsean Jul 9, 2024
386aacd
convert op pool messages to electra in electra
realbigsean Jul 11, 2024
71a2ead
remove methods to post without content header
realbigsean Jul 11, 2024
e3ce7fc
Add BeaconBlocksByRange v3
dapplion Jul 15, 2024
9f40d91
Revert "Add BeaconBlocksByRange v3"
dapplion Jul 15, 2024
4065ef6
filter instead of convert
realbigsean Jul 15, 2024
0e59939
Add range sync metrics to track efficiency (#6095)
dapplion Jul 15, 2024
7b283c5
Enable the outbound rate limiter by default, and update blobs method …
jimmygchen Jul 15, 2024
f290c68
Beacon api + validator electra (#5744)
realbigsean Jul 15, 2024
6e54763
Merge branch 'unstable' of https://github.com/sigp/lighthouse into be…
realbigsean Jul 15, 2024
a8aaa42
Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthou…
realbigsean Jul 15, 2024
d88302a
fix ef test compile
realbigsean Jul 15, 2024
c48cd52
use `enabled` fork methods
realbigsean Jul 15, 2024
c0fd66f
get tests passing
realbigsean Jul 15, 2024
064c461
last updates
realbigsean Jul 15, 2024
cf01312
Merge branch 'unstable' of https://github.com/sigp/lighthouse into ef…
realbigsean Jul 16, 2024
42c8c45
add deposit request file
realbigsean Jul 16, 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
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/eth1_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ impl<E: EthSpec> Eth1ChainBackend<E> for CachingEth1Backend<E> {

// [New in Electra:EIP6110]
let deposit_index_limit =
if let Ok(deposit_receipts_start_index) = state.deposit_requests_start_index() {
std::cmp::min(deposit_count, deposit_receipts_start_index)
if let Ok(deposit_requests_start_index) = state.deposit_requests_start_index() {
std::cmp::min(deposit_count, deposit_requests_start_index)
} else {
deposit_count
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn initiate_validator_exit<E: EthSpec>(

// Compute exit queue epoch
let exit_queue_epoch = if state.fork_name_unchecked() >= ForkName::Electra {
let effective_balance = state.get_validator(index)?.effective_balance;
let effective_balance = state.get_effective_balance(index)?;
state.compute_exit_epoch_and_update_churn(effective_balance, spec)?
} else {
let delayed_epoch = state.compute_activation_exit_epoch(state.current_epoch(), spec)?;
Expand Down
5 changes: 3 additions & 2 deletions consensus/state_processing/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use super::per_block_processing::{
errors::BlockProcessingError, process_operations::apply_deposit,
};
use crate::common::DepositDataTree;
use crate::upgrade::electra::upgrade_state_to_electra;
use crate::upgrade::{
upgrade_to_altair, upgrade_to_bellatrix, upgrade_to_capella, upgrade_to_deneb,
upgrade_to_electra,
};
use safe_arith::{ArithError, SafeArith};
use tree_hash::TreeHash;
Expand Down Expand Up @@ -116,7 +116,8 @@ pub fn initialize_beacon_state_from_eth1<E: EthSpec>(
.electra_fork_epoch
.map_or(false, |fork_epoch| fork_epoch == E::genesis_epoch())
{
upgrade_to_electra(&mut state, spec)?;
let post = upgrade_state_to_electra(&mut state, Epoch::new(0), Epoch::new(0), spec)?;
state = post;

// Remove intermediate Deneb fork from `state.fork`.
state.fork_mut().previous_version = spec.electra_fork_version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ pub fn process_epoch_single_pass<E: EthSpec>(
state,
&mut next_epoch_cache,
effective_balances_ctxt,
conf.effective_balance_updates,
state_ctxt,
spec,
)?;
Expand Down Expand Up @@ -859,6 +860,7 @@ fn process_pending_consolidations<E: EthSpec>(
state: &mut BeaconState<E>,
next_epoch_cache: &mut PreEpochCache,
effective_balances_ctxt: &EffectiveBalancesContext,
perform_effective_balance_updates: bool,
state_ctxt: &StateContext,
spec: &ChainSpec,
) -> Result<(), Error> {
Expand Down Expand Up @@ -910,6 +912,11 @@ fn process_pending_consolidations<E: EthSpec>(
)?;
*state.pending_consolidations_mut()? = new_pending_consolidations;

// the spec tests require we don't perform effective balance updates when testing pending_consolidations
if !perform_effective_balance_updates {
return Ok(());
}

// Re-process effective balance updates for validators affected by consolidations.
let (validators, balances, _, current_epoch_participation, _, progressive_balances, _, _) =
state.mutable_validator_fields()?;
Expand Down
97 changes: 57 additions & 40 deletions consensus/state_processing/src/upgrade/electra.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use safe_arith::SafeArith;
use std::mem;
use types::{
BeaconState, BeaconStateElectra, BeaconStateError as Error, ChainSpec, EpochCache, EthSpec,
Fork,
BeaconState, BeaconStateElectra, BeaconStateError as Error, ChainSpec, Epoch, EpochCache,
EthSpec, Fork,
};

/// Transform a `Deneb` state into an `Electra` state.
Expand All @@ -26,13 +26,66 @@ pub fn upgrade_to_electra<E: EthSpec>(
pre_state.build_total_active_balance_cache(spec)?;
let earliest_consolidation_epoch = spec.compute_activation_exit_epoch(epoch)?;

let mut post = upgrade_state_to_electra(
pre_state,
earliest_exit_epoch,
earliest_consolidation_epoch,
spec,
)?;

*post.exit_balance_to_consume_mut()? = post.get_activation_exit_churn_limit(spec)?;
*post.consolidation_balance_to_consume_mut()? = post.get_consolidation_churn_limit(spec)?;

// Add validators that are not yet active to pending balance deposits
let validators = post.validators().clone();
let mut pre_activation = validators
.iter()
.enumerate()
.filter(|(_, validator)| validator.activation_epoch == spec.far_future_epoch)
.collect::<Vec<_>>();

// Sort the indices by activation_eligibility_epoch and then by index
pre_activation.sort_by(|(index_a, val_a), (index_b, val_b)| {
if val_a.activation_eligibility_epoch == val_b.activation_eligibility_epoch {
index_a.cmp(index_b)
} else {
val_a
.activation_eligibility_epoch
.cmp(&val_b.activation_eligibility_epoch)
}
});

// Process validators to queue entire balance and reset them
for (index, _) in pre_activation {
post.queue_entire_balance_and_reset_validator(index, spec)?;
}

// Ensure early adopters of compounding credentials go through the activation churn
for (index, validator) in validators.iter().enumerate() {
if validator.has_compounding_withdrawal_credential(spec) {
post.queue_excess_active_balance(index, spec)?;
}
}

*pre_state = post;

Ok(())
}

pub fn upgrade_state_to_electra<E: EthSpec>(
pre_state: &mut BeaconState<E>,
earliest_exit_epoch: Epoch,
earliest_consolidation_epoch: Epoch,
spec: &ChainSpec,
) -> Result<BeaconState<E>, Error> {
let epoch = pre_state.current_epoch();
let pre = pre_state.as_deneb_mut()?;
// Where possible, use something like `mem::take` to move fields from behind the &mut
// reference. For other fields that don't have a good default value, use `clone`.
//
// Fixed size vectors get cloned because replacing them would require the same size
// allocation as cloning.
let mut post = BeaconState::Electra(BeaconStateElectra {
let post = BeaconState::Electra(BeaconStateElectra {
// Versioning
genesis_time: pre.genesis_time,
genesis_validators_root: pre.genesis_validators_root,
Expand Down Expand Up @@ -96,41 +149,5 @@ pub fn upgrade_to_electra<E: EthSpec>(
slashings_cache: mem::take(&mut pre.slashings_cache),
epoch_cache: EpochCache::default(),
});
*post.exit_balance_to_consume_mut()? = post.get_activation_exit_churn_limit(spec)?;
*post.consolidation_balance_to_consume_mut()? = post.get_consolidation_churn_limit(spec)?;

// Add validators that are not yet active to pending balance deposits
let validators = post.validators().clone();
let mut pre_activation = validators
.iter()
.enumerate()
.filter(|(_, validator)| validator.activation_epoch == spec.far_future_epoch)
.collect::<Vec<_>>();

// Sort the indices by activation_eligibility_epoch and then by index
pre_activation.sort_by(|(index_a, val_a), (index_b, val_b)| {
if val_a.activation_eligibility_epoch == val_b.activation_eligibility_epoch {
index_a.cmp(index_b)
} else {
val_a
.activation_eligibility_epoch
.cmp(&val_b.activation_eligibility_epoch)
}
});

// Process validators to queue entire balance and reset them
for (index, _) in pre_activation {
post.queue_entire_balance_and_reset_validator(index, spec)?;
}

// Ensure early adopters of compounding credentials go through the activation churn
for (index, validator) in validators.iter().enumerate() {
if validator.has_compounding_withdrawal_credential(spec) {
post.queue_excess_active_balance(index, spec)?;
}
}

*pre_state = post;

Ok(())
Ok(post)
}
12 changes: 11 additions & 1 deletion consensus/types/src/beacon_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ where
pub eth1_deposit_index: u64,

// Registry
#[compare_fields(as_iter)]
#[test_random(default)]
pub validators: List<Validator, E::ValidatorRegistryLimit>,
#[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
Expand All @@ -405,8 +406,10 @@ where
pub current_epoch_attestations: List<PendingAttestation<E>, E::MaxPendingAttestations>,

// Participation (Altair and later)
#[compare_fields(as_iter)]
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
#[test_random(default)]
#[compare_fields(as_iter)]
pub previous_epoch_participation: List<ParticipationFlags, E::ValidatorRegistryLimit>,
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
#[test_random(default)]
Expand Down Expand Up @@ -483,7 +486,11 @@ where
// Electra
#[superstruct(only(Electra), partial_getter(copy))]
#[metastruct(exclude_from(tree_lists))]
#[serde(with = "serde_utils::quoted_u64")]
#[serde(
with = "serde_utils::quoted_u64",
//TODO(electra) remove alias when ef tests are updated
alias = "deposit_receipts_start_index"
)]
pub deposit_requests_start_index: u64,
#[superstruct(only(Electra), partial_getter(copy))]
#[metastruct(exclude_from(tree_lists))]
Expand All @@ -503,13 +510,16 @@ where
#[superstruct(only(Electra), partial_getter(copy))]
#[metastruct(exclude_from(tree_lists))]
pub earliest_consolidation_epoch: Epoch,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_balance_deposits: List<PendingBalanceDeposit, E::PendingBalanceDepositsLimit>,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_partial_withdrawals:
List<PendingPartialWithdrawal, E::PendingPartialWithdrawalsLimit>,
#[compare_fields(as_iter)]
#[test_random(default)]
#[superstruct(only(Electra))]
pub pending_consolidations: List<PendingConsolidation, E::PendingConsolidationsLimit>,
Expand Down
8 changes: 8 additions & 0 deletions consensus/types/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,14 @@ impl ChainSpec {
electra_fork_epoch: None,
max_pending_partials_per_withdrawals_sweep: u64::checked_pow(2, 0)
.expect("pow does not overflow"),
min_per_epoch_churn_limit_electra: option_wrapper(|| {
u64::checked_pow(2, 6)?.checked_mul(u64::checked_pow(10, 9)?)
})
.expect("calculation does not overflow"),
max_per_epoch_activation_exit_churn_limit: option_wrapper(|| {
u64::checked_pow(2, 7)?.checked_mul(u64::checked_pow(10, 9)?)
})
.expect("calculation does not overflow"),
// Other
network_id: 2, // lighthouse testnet network id
deposit_chain_id: 5,
Expand Down
2 changes: 2 additions & 0 deletions consensus/types/src/execution_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ pub struct ExecutionPayload<E: EthSpec> {
#[serde(with = "serde_utils::quoted_u64")]
pub excess_blob_gas: u64,
#[superstruct(only(Electra))]
//TODO(electra) remove alias once EF tests are updates with correct name
#[serde(alias = "deposit_receipts")]
pub deposit_requests: VariableList<DepositRequest, E::MaxDepositRequestsPerPayload>,
#[superstruct(only(Electra))]
pub withdrawal_requests:
Expand Down
8 changes: 5 additions & 3 deletions consensus/types/src/execution_payload_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ pub struct ExecutionPayloadHeader<E: EthSpec> {
#[serde(with = "serde_utils::quoted_u64")]
pub excess_blob_gas: u64,
#[superstruct(only(Electra), partial_getter(copy))]
pub deposit_receipts_root: Hash256,
//TODO(electra) remove alias once EF tests are updates with correct name
#[serde(alias = "deposit_receipts_root")]
pub deposit_requests_root: Hash256,
#[superstruct(only(Electra), partial_getter(copy))]
pub withdrawal_requests_root: Hash256,
}
Expand Down Expand Up @@ -202,7 +204,7 @@ impl<E: EthSpec> ExecutionPayloadHeaderDeneb<E> {
withdrawals_root: self.withdrawals_root,
blob_gas_used: self.blob_gas_used,
excess_blob_gas: self.excess_blob_gas,
deposit_receipts_root: Hash256::zero(),
deposit_requests_root: Hash256::zero(),
withdrawal_requests_root: Hash256::zero(),
}
}
Expand Down Expand Up @@ -295,7 +297,7 @@ impl<'a, E: EthSpec> From<&'a ExecutionPayloadElectra<E>> for ExecutionPayloadHe
withdrawals_root: payload.withdrawals.tree_hash_root(),
blob_gas_used: payload.blob_gas_used,
excess_blob_gas: payload.excess_blob_gas,
deposit_receipts_root: payload.deposit_requests.tree_hash_root(),
deposit_requests_root: payload.deposit_requests.tree_hash_root(),
withdrawal_requests_root: payload.withdrawal_requests.tree_hash_root(),
}
}
Expand Down
12 changes: 12 additions & 0 deletions consensus/types/src/fork_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@ impl ForkName {
}
}

pub fn altair_enabled(self) -> bool {
self >= ForkName::Altair
}

pub fn bellatrix_enabled(self) -> bool {
self >= ForkName::Bellatrix
}

pub fn capella_enabled(self) -> bool {
self >= ForkName::Capella
}

pub fn deneb_enabled(self) -> bool {
self >= ForkName::Deneb
}
Expand Down
4 changes: 2 additions & 2 deletions consensus/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub mod contribution_and_proof;
pub mod deposit;
pub mod deposit_data;
pub mod deposit_message;
pub mod deposit_receipt;
pub mod deposit_request;
pub mod deposit_tree_snapshot;
pub mod enr_fork_id;
pub mod eth1_data;
Expand Down Expand Up @@ -150,7 +150,7 @@ pub use crate::contribution_and_proof::ContributionAndProof;
pub use crate::deposit::{Deposit, DEPOSIT_TREE_DEPTH};
pub use crate::deposit_data::DepositData;
pub use crate::deposit_message::DepositMessage;
pub use crate::deposit_receipt::DepositRequest;
pub use crate::deposit_request::DepositRequest;
pub use crate::deposit_tree_snapshot::{DepositTreeSnapshot, FinalizedExecutionBlock};
pub use crate::enr_fork_id::EnrForkId;
pub use crate::epoch_cache::{EpochCache, EpochCacheError, EpochCacheKey};
Expand Down
2 changes: 1 addition & 1 deletion testing/ef_tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TESTS_TAG := v1.4.0-beta.6
TESTS_TAG := v1.5.0-alpha.2
TESTS = general minimal mainnet
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))

Expand Down
10 changes: 8 additions & 2 deletions testing/ef_tests/check_all_files_accessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@
"bls12-381-tests/hash_to_G2",
"tests/.*/eip6110",
"tests/.*/whisk",
# TODO(electra): re-enable in https://github.com/sigp/lighthouse/pull/5758
"tests/.*/.*/ssz_static/IndexedAttestation"
"tests/.*/eip7594",
# TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
"tests/.*/electra/ssz_static/LightClientUpdate",
"tests/.*/electra/ssz_static/LightClientFinalityUpdate",
"tests/.*/electra/ssz_static/LightClientBootstrap",
# TODO(electra) re-enable as DepositRequest when EF tests are updated
"tests/.*/electra/operations/deposit_receipt",
"tests/.*/electra/ssz_static/DepositReceipt"
]


Expand Down
Loading