Skip to content

Commit 8a32df7

Browse files
authored
Ef tests electra (#5758)
* Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Merge pull request #5749 from sigp/electra_op_pool Optimise Electra op pool aggregation * don't fail on empty consolidations * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * update committee offset * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * update committee offset * update committee offset * update committee offset * update committee offset * update committee offset * only increment deposit index on state for old deposit flow * Revert "only increment deposit index on state for old deposit flow" This reverts commit 817d423. * only increment the state deposit index on old deposit flow * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * read electra payloads from file * accept new payload v4 in mock el * use correct max eb in epoch cache initialization * drop initiate validator ordering optimization * fix initiate exit for single pass * use correct max eb in epoch cache initialization * drop initiate validator ordering optimization * fix initiate exit for single pass * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * accept new payload v4 in mock el * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * fix genesis from eth1 for electra * Fix Electra Fork Choice Tests (#5764) * add new operation tests * Fix Electra Fork Choice Tests (#5764) * Fix Electra Fork Choice Tests (#5764) * Fix Electra Fork Choice Tests (#5764) * add epoch processing new tests * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'ef-tests-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * fix ef test compilation * disable and enable ef test for epoch processing appropriately * add consolidations to merkle calc for inclusion proof * fix should_override_fc tests * Merge branch 'ef-tests-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * get ssz tests compiling * ssz merkle validity for only deneb * im dumb af * Merge remote-tracking branch 'upstream/ef-tests-electra' into ef-tests-electra * enable tests * Fix Consolidation Sigs & Withdrawals * Merge pull request #5766 from ethDreamer/two_fixes Fix Consolidation Sigs & Withdrawals * Merge branches 'block-processing-electra' and 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * comment out consolidation operation ef tests until they are added * add signed consolidation ssz tests * add as_iter to all List and Vector fields in the beacon state * remove dbg * Send unagg attestation based on fork * Merge branch 'beacon-api-electra' into p2p-electra * Merge branch 'p2p-electra' into ef-tests-electra * Fix Epoch Processing Consolidations * Fix Final Spec Tests! * Fix ser/de * Merge branch 'electra-engine-api' into beacon-api-electra * Merge branch 'beacon-api-electra' into p2p-electra * Merge branch 'p2p-electra' into ef-tests-electra * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * update electra readiness with new endpoints * don't block mev boost till genesis finalization * Publish all aggregates * just one more check bro plz.. * Fix Bug In Block Processing with 0x02 Credentials * fix slashing handling * Fix Bug In Block Processing with 0x02 Credentials * Merge remote-tracking branch 'upstream/unstable' * Send unagg attestation based on fork * Publish all aggregates * just one more check bro plz.. * Merge pull request #5832 from ethDreamer/electra_attestation_changes_merge_unstable Merge `unstable` into `electra_attestation_changes` * Merge pull request #5835 from realbigsean/fix-validator-logic Fix validator logic * Merge pull request #5816 from realbigsean/electra-attestation-slashing-handling Electra slashing handling * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Rename deploy block electra (#5853) * Rename deploy_block.txt to deposit_contract_block.txt * fmt * Change for prater too * fix: serde rename camle case for execution payload body (#5846) * Merge branch 'electra-engine-api' into beacon-api-electra * Merge branch 'beacon-api-electra' into p2p-electra * Merge branch 'p2p-electra' into ef-tests-electra * Electra attestation changes rm decode impl (#5856) * Remove Crappy Decode impl for Attestation * Remove Inefficient Attestation Decode impl * Implement Schema Upgrade / Downgrade * Update beacon_node/beacon_chain/src/schema_change/migration_schema_v20.rs Co-authored-by: Michael Sproul <[email protected]> --------- Co-authored-by: Michael Sproul <[email protected]> * Fix failing attestation tests and misc electra attestation cleanup (#5810) * - get attestation related beacon chain tests to pass - observed attestations are now keyed off of data + committee index - rename op pool attestationref to compactattestationref - remove unwraps in agg pool and use options instead - cherry pick some changes from ef-tests-electra * cargo fmt * fix failing test * Revert dockerfile changes * make committee_index return option * function args shouldnt be a ref to attestation ref * fmt * fix dup imports --------- Co-authored-by: realbigsean <[email protected]> * fix some todos (#5817) * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * add consolidations to merkle calc for inclusion proof * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into p2p-electra * Merge branch 'p2p-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Remove Duplicate KZG Commitment Merkle Proof Code (#5874) * Remove Duplicate KZG Commitment Merkle Proof Code * s/tree_lists/fields/ * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * fix compile * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Fix slasher tests (#5906) * Fix electra tests * Add electra attestations to double vote tests * Update superstruct to 0.8 * Merge remote-tracking branch 'origin/unstable' into electra_attestation_changes * Small cleanup in slasher tests * Clean up Electra observed aggregates (#5929) * Use consistent key in observed_attestations * Remove unwraps from observed aggregates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * De-dup attestation constructor logic * Remove unwraps in Attestation construction * Dedup match_attestation_data * Remove outdated TODO * Use ForkName Ord in fork-choice tests * Use ForkName Ord in BeaconBlockBody * Make to_electra not fallible * Remove TestRandom impl for IndexedAttestation * Remove IndexedAttestation faulty Decode impl * Drop TestRandom impl * Add PendingAttestationInElectra * Indexed att on disk (#35) * indexed att on disk * fix lints * Update slasher/src/migrate.rs Co-authored-by: ethDreamer <[email protected]> --------- Co-authored-by: Lion - dapplion <[email protected]> Co-authored-by: ethDreamer <[email protected]> * add electra fork enabled fn to ForkName impl (#36) * add electra fork enabled fn to ForkName impl * remove inadvertent file * Update common/eth2/src/types.rs Co-authored-by: ethDreamer <[email protected]> * Dedup attestation constructor logic in attester cache * Use if let Ok for committee_bits * Dedup Attestation constructor code * Diff reduction in tests * Fix beacon_chain tests * Diff reduction * Use Ord for ForkName in pubsub * Resolve into_attestation_and_indices todo * Remove stale TODO * Fix beacon_chain tests * Test spec invariant * Use electra_enabled in pubsub * Remove get_indexed_attestation_from_signed_aggregate * Use ok_or instead of if let else * committees are sorted * remove dup method `get_indexed_attestation_from_committees` * Merge pull request #5940 from dapplion/electra_attestation_changes_lionreview Electra attestations #5712 review * update default persisted op pool deserialization * ensure aggregate and proof uses serde untagged on ref * Fork aware ssz static attestation tests * Electra attestation changes from Lions review (#5971) * dedup/cleanup and remove unneeded hashset use * remove irrelevant TODOs * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Fix Compilation Break * Merge pull request #5973 from ethDreamer/beacon-api-electra Fix Compilation Break * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * Electra attestation changes sean review (#5972) * instantiate empty bitlist in unreachable code * clean up error conversion * fork enabled bool cleanup * remove a couple todos * return bools instead of options in `aggregate` and use the result * delete commented out code * use map macros in simple transformations * remove signers_disjoint_from * get ef tests compiling * get ef tests compiling * update intentionally excluded files * Avoid changing slasher schema for Electra * Delete slasher schema v4 * Fix clippy * Fix compilation of beacon_chain tests * Update database.rs * Update per_block_processing.rs * Add electra lightclient types * Update slasher/src/database.rs * fix imports * Merge pull request #5980 from dapplion/electra-lightclient Add electra lightclient types * Merge pull request #5975 from michaelsproul/electra-slasher-no-migration Avoid changing slasher schema for Electra * Update beacon_node/beacon_chain/src/attestation_verification.rs * Update beacon_node/beacon_chain/src/attestation_verification.rs * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/realbigsean/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * clean up enabled and disabled fork logic in ef tests * add light client ssz tests * disable failing light client ssz tests * correctly exclude light client struct from accessed files * The great renaming receipt -> request * Address some more review comments * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra-engine-api * Update beacon_node/beacon_chain/src/electra_readiness.rs * Update consensus/types/src/chain_spec.rs * update GET requests * update POST requests * add client updates and test updates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * compile after merge * unwrap -> unwrap_err * self review * fix tests * convert op pool messages to electra in electra * remove methods to post without content header * Add BeaconBlocksByRange v3 * Revert "Add BeaconBlocksByRange v3" This reverts commit e3ce7fc. * filter instead of convert * Add range sync metrics to track efficiency (#6095) * Add more range sync metrics to track efficiency * Add ignored blocks metrics * Enable the outbound rate limiter by default, and update blobs method quotas (#6093) * Enable the outbound rate limiter by default, and update blobs method quotas. * Lint and book updates. * Beacon api + validator electra (#5744) * Attestation superstruct changes for EIP 7549 (#5644) * update * experiment * superstruct changes * revert * superstruct changes * fix tests * indexed attestation * indexed attestation superstruct * updated TODOs * `superstruct` the `AttesterSlashing` (#5636) * `superstruct` Attester Fork Variants * Push a little further * Deal with Encode / Decode of AttesterSlashing * not so sure about this.. * Stop Encode/Decode Bounds from Propagating Out * Tons of Changes.. * More Conversions to AttestationRef * Add AsReference trait (#15) * Add AsReference trait * Fix some snafus * Got it Compiling! :D * Got Tests Building * Get beacon chain tests compiling --------- Co-authored-by: Michael Sproul <[email protected]> * Merge remote-tracking branch 'upstream/unstable' into electra_attestation_changes * Make EF Tests Fork-Agnostic (#5713) * Finish EF Test Fork Agnostic (#5714) * Superstruct `AggregateAndProof` (#5715) * Upgrade `superstruct` to `0.8.0` * superstruct `AggregateAndProof` * Merge remote-tracking branch 'sigp/unstable' into electra_attestation_changes * cargo fmt * Merge pull request #5726 from realbigsean/electra_attestation_changes Merge unstable into Electra attestation changes * process withdrawals updates * cleanup withdrawals processing * update `process_operations` deposit length check * add apply_deposit changes * add execution layer withdrawal request processing * process deposit receipts * add consolidation processing * update process operations function * exit updates * clean up * update slash_validator * EIP7549 `get_attestation_indices` (#5657) * get attesting indices electra impl * fmt * get tests to pass * fmt * fix some beacon chain tests * fmt * fix slasher test * fmt got me again * fix more tests * fix tests * Some small changes (#5739) * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * cargo fmt (#5740) * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * fix attestation verification * Add new engine api methods * Fix the versioning of v4 requests * Handle new engine api methods in mock EL * Note todo * Fix todos * Add support for electra fields in getPayloadBodies * Add comments for potential versioning confusion * udpates for aggregate attestation endpoint * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Sketch op pool changes * fix get attesting indices (#5742) * fix get attesting indices * better errors * fix compile * only get committee index once * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Ef test fixes (#5753) * attestation related ef test fixes * delete commented out stuff * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Fix Aggregation Pool for Electra (#5754) * Fix Aggregation Pool for Electra * Remove Outdated Interface * fix ssz (#5755) * Get `electra_op_pool` up to date (#5756) * fix get attesting indices (#5742) * fix get attesting indices * better errors * fix compile * only get committee index once * Ef test fixes (#5753) * attestation related ef test fixes * delete commented out stuff * Fix Aggregation Pool for Electra (#5754) * Fix Aggregation Pool for Electra * Remove Outdated Interface * fix ssz (#5755) --------- Co-authored-by: realbigsean <[email protected]> * Revert "Get `electra_op_pool` up to date (#5756)" (#5757) This reverts commit ab9e58a. * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into electra_op_pool * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Compute on chain aggregate impl (#5752) * add compute_on_chain_agg impl to op pool changes * fmt * get op pool tests to pass * update beacon api aggregate attestationendpoint * update the naive agg pool interface (#5760) * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * updates after merge * Fix bugs in cross-committee aggregation * Add comment to max cover optimisation * Fix assert * Electra epoch processing * add deposit limit for old deposit queue * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge pull request #5749 from sigp/electra_op_pool Optimise Electra op pool aggregation * don't fail on empty consolidations * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * update committee offset * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * update committee offset * update committee offset * update committee offset * only increment the state deposit index on old deposit flow * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * use correct max eb in epoch cache initialization * drop initiate validator ordering optimization * fix initiate exit for single pass * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * accept new payload v4 in mock el * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Fix Electra Fork Choice Tests (#5764) * Fix Electra Fork Choice Tests (#5764) * Fix Electra Fork Choice Tests (#5764) * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Fix Consolidation Sigs & Withdrawals * Merge pull request #5766 from ethDreamer/two_fixes Fix Consolidation Sigs & Withdrawals * Merge branches 'block-processing-electra' and 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Send unagg attestation based on fork * Fix ser/de * Merge branch 'electra-engine-api' into beacon-api-electra * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * Subscribe to the correct subnets for electra attestations (#5782) * subscribe to the correct att subnets for electra * subscribe to the correct att subnets for electra * cargo fmt * update electra readiness with new endpoints * fix slashing handling * Fix Bug In Block Processing with 0x02 Credentials * Merge remote-tracking branch 'upstream/unstable' * Send unagg attestation based on fork * Publish all aggregates * just one more check bro plz.. * Merge pull request #5832 from ethDreamer/electra_attestation_changes_merge_unstable Merge `unstable` into `electra_attestation_changes` * Merge pull request #5835 from realbigsean/fix-validator-logic Fix validator logic * Merge pull request #5816 from realbigsean/electra-attestation-slashing-handling Electra slashing handling * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * fix: serde rename camle case for execution payload body (#5846) * Merge branch 'electra-engine-api' into beacon-api-electra * Electra attestation changes rm decode impl (#5856) * Remove Crappy Decode impl for Attestation * Remove Inefficient Attestation Decode impl * Implement Schema Upgrade / Downgrade * Update beacon_node/beacon_chain/src/schema_change/migration_schema_v20.rs Co-authored-by: Michael Sproul <[email protected]> --------- Co-authored-by: Michael Sproul <[email protected]> * Fix failing attestation tests and misc electra attestation cleanup (#5810) * - get attestation related beacon chain tests to pass - observed attestations are now keyed off of data + committee index - rename op pool attestationref to compactattestationref - remove unwraps in agg pool and use options instead - cherry pick some changes from ef-tests-electra * cargo fmt * fix failing test * Revert dockerfile changes * make committee_index return option * function args shouldnt be a ref to attestation ref * fmt * fix dup imports --------- Co-authored-by: realbigsean <[email protected]> * fix some todos (#5817) * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * add consolidations to merkle calc for inclusion proof * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Remove Duplicate KZG Commitment Merkle Proof Code (#5874) * Remove Duplicate KZG Commitment Merkle Proof Code * s/tree_lists/fields/ * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * fix compile * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Fix slasher tests (#5906) * Fix electra tests * Add electra attestations to double vote tests * Update superstruct to 0.8 * Merge remote-tracking branch 'origin/unstable' into electra_attestation_changes * Small cleanup in slasher tests * Clean up Electra observed aggregates (#5929) * Use consistent key in observed_attestations * Remove unwraps from observed aggregates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * De-dup attestation constructor logic * Remove unwraps in Attestation construction * Dedup match_attestation_data * Remove outdated TODO * Use ForkName Ord in fork-choice tests * Use ForkName Ord in BeaconBlockBody * Make to_electra not fallible * Remove TestRandom impl for IndexedAttestation * Remove IndexedAttestation faulty Decode impl * Drop TestRandom impl * Add PendingAttestationInElectra * Indexed att on disk (#35) * indexed att on disk * fix lints * Update slasher/src/migrate.rs Co-authored-by: ethDreamer <[email protected]> --------- Co-authored-by: Lion - dapplion <[email protected]> Co-authored-by: ethDreamer <[email protected]> * add electra fork enabled fn to ForkName impl (#36) * add electra fork enabled fn to ForkName impl * remove inadvertent file * Update common/eth2/src/types.rs Co-authored-by: ethDreamer <[email protected]> * Dedup attestation constructor logic in attester cache * Use if let Ok for committee_bits * Dedup Attestation constructor code * Diff reduction in tests * Fix beacon_chain tests * Diff reduction * Use Ord for ForkName in pubsub * Resolve into_attestation_and_indices todo * Remove stale TODO * Fix beacon_chain tests * Test spec invariant * Use electra_enabled in pubsub * Remove get_indexed_attestation_from_signed_aggregate * Use ok_or instead of if let else * committees are sorted * remove dup method `get_indexed_attestation_from_committees` * Merge pull request #5940 from dapplion/electra_attestation_changes_lionreview Electra attestations #5712 review * update default persisted op pool deserialization * ensure aggregate and proof uses serde untagged on ref * Fork aware ssz static attestation tests * Electra attestation changes from Lions review (#5971) * dedup/cleanup and remove unneeded hashset use * remove irrelevant TODOs * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * Fix Compilation Break * Merge pull request #5973 from ethDreamer/beacon-api-electra Fix Compilation Break * Electra attestation changes sean review (#5972) * instantiate empty bitlist in unreachable code * clean up error conversion * fork enabled bool cleanup * remove a couple todos * return bools instead of options in `aggregate` and use the result * delete commented out code * use map macros in simple transformations * remove signers_disjoint_from * get ef tests compiling * get ef tests compiling * update intentionally excluded files * Avoid changing slasher schema for Electra * Delete slasher schema v4 * Fix clippy * Fix compilation of beacon_chain tests * Update database.rs * Update per_block_processing.rs * Add electra lightclient types * Update slasher/src/database.rs * fix imports * Merge pull request #5980 from dapplion/electra-lightclient Add electra lightclient types * Merge pull request #5975 from michaelsproul/electra-slasher-no-migration Avoid changing slasher schema for Electra * Update beacon_node/beacon_chain/src/attestation_verification.rs * Update beacon_node/beacon_chain/src/attestation_verification.rs * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes * Merge branch 'electra_attestation_changes' of https://github.com/realbigsean/lighthouse into block-processing-electra * Merge branch 'block-processing-electra' of https://github.com/sigp/lighthouse into electra-epoch-proc * Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * The great renaming receipt -> request * Address some more review comments * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra-engine-api * Update beacon_node/beacon_chain/src/electra_readiness.rs * Update consensus/types/src/chain_spec.rs * update GET requests * update POST requests * add client updates and test updates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra-engine-api * Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra * compile after merge * unwrap -> unwrap_err * self review * fix tests * convert op pool messages to electra in electra * remove methods to post without content header * filter instead of convert * Merge branch 'unstable' of https://github.com/sigp/lighthouse into beacon-api-electra * Merge branch 'beacon-api-electra' of https://github.com/sigp/lighthouse into ef-tests-electra * fix ef test compile * use `enabled` fork methods * get tests passing * last updates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into ef-tests-electra * add deposit request file
1 parent bf2f0b0 commit 8a32df7

File tree

20 files changed

+460
-132
lines changed

20 files changed

+460
-132
lines changed

beacon_node/beacon_chain/src/eth1_chain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ impl<E: EthSpec> Eth1ChainBackend<E> for CachingEth1Backend<E> {
548548

549549
// [New in Electra:EIP6110]
550550
let deposit_index_limit =
551-
if let Ok(deposit_receipts_start_index) = state.deposit_requests_start_index() {
552-
std::cmp::min(deposit_count, deposit_receipts_start_index)
551+
if let Ok(deposit_requests_start_index) = state.deposit_requests_start_index() {
552+
std::cmp::min(deposit_count, deposit_requests_start_index)
553553
} else {
554554
deposit_count
555555
};

consensus/state_processing/src/common/initiate_validator_exit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn initiate_validator_exit<E: EthSpec>(
2020

2121
// Compute exit queue epoch
2222
let exit_queue_epoch = if state.fork_name_unchecked() >= ForkName::Electra {
23-
let effective_balance = state.get_validator(index)?.effective_balance;
23+
let effective_balance = state.get_effective_balance(index)?;
2424
state.compute_exit_epoch_and_update_churn(effective_balance, spec)?
2525
} else {
2626
let delayed_epoch = state.compute_activation_exit_epoch(state.current_epoch(), spec)?;

consensus/state_processing/src/genesis.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use super::per_block_processing::{
22
errors::BlockProcessingError, process_operations::apply_deposit,
33
};
44
use crate::common::DepositDataTree;
5+
use crate::upgrade::electra::upgrade_state_to_electra;
56
use crate::upgrade::{
67
upgrade_to_altair, upgrade_to_bellatrix, upgrade_to_capella, upgrade_to_deneb,
7-
upgrade_to_electra,
88
};
99
use safe_arith::{ArithError, SafeArith};
1010
use tree_hash::TreeHash;
@@ -116,7 +116,8 @@ pub fn initialize_beacon_state_from_eth1<E: EthSpec>(
116116
.electra_fork_epoch
117117
.map_or(false, |fork_epoch| fork_epoch == E::genesis_epoch())
118118
{
119-
upgrade_to_electra(&mut state, spec)?;
119+
let post = upgrade_state_to_electra(&mut state, Epoch::new(0), Epoch::new(0), spec)?;
120+
state = post;
120121

121122
// Remove intermediate Deneb fork from `state.fork`.
122123
state.fork_mut().previous_version = spec.electra_fork_version;

consensus/state_processing/src/per_epoch_processing/single_pass.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ pub fn process_epoch_single_pass<E: EthSpec>(
359359
state,
360360
&mut next_epoch_cache,
361361
effective_balances_ctxt,
362+
conf.effective_balance_updates,
362363
state_ctxt,
363364
spec,
364365
)?;
@@ -859,6 +860,7 @@ fn process_pending_consolidations<E: EthSpec>(
859860
state: &mut BeaconState<E>,
860861
next_epoch_cache: &mut PreEpochCache,
861862
effective_balances_ctxt: &EffectiveBalancesContext,
863+
perform_effective_balance_updates: bool,
862864
state_ctxt: &StateContext,
863865
spec: &ChainSpec,
864866
) -> Result<(), Error> {
@@ -910,6 +912,11 @@ fn process_pending_consolidations<E: EthSpec>(
910912
)?;
911913
*state.pending_consolidations_mut()? = new_pending_consolidations;
912914

915+
// the spec tests require we don't perform effective balance updates when testing pending_consolidations
916+
if !perform_effective_balance_updates {
917+
return Ok(());
918+
}
919+
913920
// Re-process effective balance updates for validators affected by consolidations.
914921
let (validators, balances, _, current_epoch_participation, _, progressive_balances, _, _) =
915922
state.mutable_validator_fields()?;

consensus/state_processing/src/upgrade/electra.rs

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use safe_arith::SafeArith;
22
use std::mem;
33
use types::{
4-
BeaconState, BeaconStateElectra, BeaconStateError as Error, ChainSpec, EpochCache, EthSpec,
5-
Fork,
4+
BeaconState, BeaconStateElectra, BeaconStateError as Error, ChainSpec, Epoch, EpochCache,
5+
EthSpec, Fork,
66
};
77

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

29+
let mut post = upgrade_state_to_electra(
30+
pre_state,
31+
earliest_exit_epoch,
32+
earliest_consolidation_epoch,
33+
spec,
34+
)?;
35+
36+
*post.exit_balance_to_consume_mut()? = post.get_activation_exit_churn_limit(spec)?;
37+
*post.consolidation_balance_to_consume_mut()? = post.get_consolidation_churn_limit(spec)?;
38+
39+
// Add validators that are not yet active to pending balance deposits
40+
let validators = post.validators().clone();
41+
let mut pre_activation = validators
42+
.iter()
43+
.enumerate()
44+
.filter(|(_, validator)| validator.activation_epoch == spec.far_future_epoch)
45+
.collect::<Vec<_>>();
46+
47+
// Sort the indices by activation_eligibility_epoch and then by index
48+
pre_activation.sort_by(|(index_a, val_a), (index_b, val_b)| {
49+
if val_a.activation_eligibility_epoch == val_b.activation_eligibility_epoch {
50+
index_a.cmp(index_b)
51+
} else {
52+
val_a
53+
.activation_eligibility_epoch
54+
.cmp(&val_b.activation_eligibility_epoch)
55+
}
56+
});
57+
58+
// Process validators to queue entire balance and reset them
59+
for (index, _) in pre_activation {
60+
post.queue_entire_balance_and_reset_validator(index, spec)?;
61+
}
62+
63+
// Ensure early adopters of compounding credentials go through the activation churn
64+
for (index, validator) in validators.iter().enumerate() {
65+
if validator.has_compounding_withdrawal_credential(spec) {
66+
post.queue_excess_active_balance(index, spec)?;
67+
}
68+
}
69+
70+
*pre_state = post;
71+
72+
Ok(())
73+
}
74+
75+
pub fn upgrade_state_to_electra<E: EthSpec>(
76+
pre_state: &mut BeaconState<E>,
77+
earliest_exit_epoch: Epoch,
78+
earliest_consolidation_epoch: Epoch,
79+
spec: &ChainSpec,
80+
) -> Result<BeaconState<E>, Error> {
81+
let epoch = pre_state.current_epoch();
2982
let pre = pre_state.as_deneb_mut()?;
3083
// Where possible, use something like `mem::take` to move fields from behind the &mut
3184
// reference. For other fields that don't have a good default value, use `clone`.
3285
//
3386
// Fixed size vectors get cloned because replacing them would require the same size
3487
// allocation as cloning.
35-
let mut post = BeaconState::Electra(BeaconStateElectra {
88+
let post = BeaconState::Electra(BeaconStateElectra {
3689
// Versioning
3790
genesis_time: pre.genesis_time,
3891
genesis_validators_root: pre.genesis_validators_root,
@@ -96,41 +149,5 @@ pub fn upgrade_to_electra<E: EthSpec>(
96149
slashings_cache: mem::take(&mut pre.slashings_cache),
97150
epoch_cache: EpochCache::default(),
98151
});
99-
*post.exit_balance_to_consume_mut()? = post.get_activation_exit_churn_limit(spec)?;
100-
*post.consolidation_balance_to_consume_mut()? = post.get_consolidation_churn_limit(spec)?;
101-
102-
// Add validators that are not yet active to pending balance deposits
103-
let validators = post.validators().clone();
104-
let mut pre_activation = validators
105-
.iter()
106-
.enumerate()
107-
.filter(|(_, validator)| validator.activation_epoch == spec.far_future_epoch)
108-
.collect::<Vec<_>>();
109-
110-
// Sort the indices by activation_eligibility_epoch and then by index
111-
pre_activation.sort_by(|(index_a, val_a), (index_b, val_b)| {
112-
if val_a.activation_eligibility_epoch == val_b.activation_eligibility_epoch {
113-
index_a.cmp(index_b)
114-
} else {
115-
val_a
116-
.activation_eligibility_epoch
117-
.cmp(&val_b.activation_eligibility_epoch)
118-
}
119-
});
120-
121-
// Process validators to queue entire balance and reset them
122-
for (index, _) in pre_activation {
123-
post.queue_entire_balance_and_reset_validator(index, spec)?;
124-
}
125-
126-
// Ensure early adopters of compounding credentials go through the activation churn
127-
for (index, validator) in validators.iter().enumerate() {
128-
if validator.has_compounding_withdrawal_credential(spec) {
129-
post.queue_excess_active_balance(index, spec)?;
130-
}
131-
}
132-
133-
*pre_state = post;
134-
135-
Ok(())
152+
Ok(post)
136153
}

consensus/types/src/beacon_state.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ where
380380
pub eth1_deposit_index: u64,
381381

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

407408
// Participation (Altair and later)
409+
#[compare_fields(as_iter)]
408410
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
409411
#[test_random(default)]
412+
#[compare_fields(as_iter)]
410413
pub previous_epoch_participation: List<ParticipationFlags, E::ValidatorRegistryLimit>,
411414
#[superstruct(only(Altair, Bellatrix, Capella, Deneb, Electra))]
412415
#[test_random(default)]
@@ -483,7 +486,11 @@ where
483486
// Electra
484487
#[superstruct(only(Electra), partial_getter(copy))]
485488
#[metastruct(exclude_from(tree_lists))]
486-
#[serde(with = "serde_utils::quoted_u64")]
489+
#[serde(
490+
with = "serde_utils::quoted_u64",
491+
//TODO(electra) remove alias when ef tests are updated
492+
alias = "deposit_receipts_start_index"
493+
)]
487494
pub deposit_requests_start_index: u64,
488495
#[superstruct(only(Electra), partial_getter(copy))]
489496
#[metastruct(exclude_from(tree_lists))]
@@ -503,13 +510,16 @@ where
503510
#[superstruct(only(Electra), partial_getter(copy))]
504511
#[metastruct(exclude_from(tree_lists))]
505512
pub earliest_consolidation_epoch: Epoch,
513+
#[compare_fields(as_iter)]
506514
#[test_random(default)]
507515
#[superstruct(only(Electra))]
508516
pub pending_balance_deposits: List<PendingBalanceDeposit, E::PendingBalanceDepositsLimit>,
517+
#[compare_fields(as_iter)]
509518
#[test_random(default)]
510519
#[superstruct(only(Electra))]
511520
pub pending_partial_withdrawals:
512521
List<PendingPartialWithdrawal, E::PendingPartialWithdrawalsLimit>,
522+
#[compare_fields(as_iter)]
513523
#[test_random(default)]
514524
#[superstruct(only(Electra))]
515525
pub pending_consolidations: List<PendingConsolidation, E::PendingConsolidationsLimit>,

consensus/types/src/chain_spec.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,14 @@ impl ChainSpec {
880880
electra_fork_epoch: None,
881881
max_pending_partials_per_withdrawals_sweep: u64::checked_pow(2, 0)
882882
.expect("pow does not overflow"),
883+
min_per_epoch_churn_limit_electra: option_wrapper(|| {
884+
u64::checked_pow(2, 6)?.checked_mul(u64::checked_pow(10, 9)?)
885+
})
886+
.expect("calculation does not overflow"),
887+
max_per_epoch_activation_exit_churn_limit: option_wrapper(|| {
888+
u64::checked_pow(2, 7)?.checked_mul(u64::checked_pow(10, 9)?)
889+
})
890+
.expect("calculation does not overflow"),
883891
// Other
884892
network_id: 2, // lighthouse testnet network id
885893
deposit_chain_id: 5,
File renamed without changes.

consensus/types/src/execution_payload.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ pub struct ExecutionPayload<E: EthSpec> {
9494
#[serde(with = "serde_utils::quoted_u64")]
9595
pub excess_blob_gas: u64,
9696
#[superstruct(only(Electra))]
97+
//TODO(electra) remove alias once EF tests are updates with correct name
98+
#[serde(alias = "deposit_receipts")]
9799
pub deposit_requests: VariableList<DepositRequest, E::MaxDepositRequestsPerPayload>,
98100
#[superstruct(only(Electra))]
99101
pub withdrawal_requests:

consensus/types/src/execution_payload_header.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ pub struct ExecutionPayloadHeader<E: EthSpec> {
8686
#[serde(with = "serde_utils::quoted_u64")]
8787
pub excess_blob_gas: u64,
8888
#[superstruct(only(Electra), partial_getter(copy))]
89-
pub deposit_receipts_root: Hash256,
89+
//TODO(electra) remove alias once EF tests are updates with correct name
90+
#[serde(alias = "deposit_receipts_root")]
91+
pub deposit_requests_root: Hash256,
9092
#[superstruct(only(Electra), partial_getter(copy))]
9193
pub withdrawal_requests_root: Hash256,
9294
}
@@ -202,7 +204,7 @@ impl<E: EthSpec> ExecutionPayloadHeaderDeneb<E> {
202204
withdrawals_root: self.withdrawals_root,
203205
blob_gas_used: self.blob_gas_used,
204206
excess_blob_gas: self.excess_blob_gas,
205-
deposit_receipts_root: Hash256::zero(),
207+
deposit_requests_root: Hash256::zero(),
206208
withdrawal_requests_root: Hash256::zero(),
207209
}
208210
}
@@ -295,7 +297,7 @@ impl<'a, E: EthSpec> From<&'a ExecutionPayloadElectra<E>> for ExecutionPayloadHe
295297
withdrawals_root: payload.withdrawals.tree_hash_root(),
296298
blob_gas_used: payload.blob_gas_used,
297299
excess_blob_gas: payload.excess_blob_gas,
298-
deposit_receipts_root: payload.deposit_requests.tree_hash_root(),
300+
deposit_requests_root: payload.deposit_requests.tree_hash_root(),
299301
withdrawal_requests_root: payload.withdrawal_requests.tree_hash_root(),
300302
}
301303
}

0 commit comments

Comments
 (0)