mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
* 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 commit817d4235ae. * 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 <micsproul@gmail.com> --------- Co-authored-by: Michael Sproul <micsproul@gmail.com> * 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 <seananderson33@GMAIL.com> * 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 <37123614+ethDreamer@users.noreply.github.com> --------- Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com> * 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 <37123614+ethDreamer@users.noreply.github.com> * 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 commite3ce7fc5ea. * 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 <micsproul@gmail.com> * 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 <sean@sigmaprime.io> * Revert "Get `electra_op_pool` up to date (#5756)" (#5757) This reverts commitab9e58aa3d. * 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 <micsproul@gmail.com> --------- Co-authored-by: Michael Sproul <micsproul@gmail.com> * 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 <seananderson33@GMAIL.com> * 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 <37123614+ethDreamer@users.noreply.github.com> --------- Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com> * 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 <37123614+ethDreamer@users.noreply.github.com> * 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
917 lines
34 KiB
Rust
917 lines
34 KiB
Rust
#![cfg(feature = "ef_tests")]
|
||
|
||
use ef_tests::*;
|
||
use types::{ExecutionLayerWithdrawalRequest, MainnetEthSpec, MinimalEthSpec, *};
|
||
|
||
// Check that the hand-computed multiplications on EthSpec are correctly computed.
|
||
// This test lives here because one is most likely to muck these up during a spec update.
|
||
fn check_typenum_values<E: EthSpec>() {
|
||
assert_eq!(
|
||
E::MaxPendingAttestations::to_u64(),
|
||
E::MaxAttestations::to_u64() * E::SlotsPerEpoch::to_u64()
|
||
);
|
||
assert_eq!(
|
||
E::SlotsPerEth1VotingPeriod::to_u64(),
|
||
E::EpochsPerEth1VotingPeriod::to_u64() * E::SlotsPerEpoch::to_u64()
|
||
);
|
||
assert_eq!(
|
||
E::MaxValidatorsPerSlot::to_u64(),
|
||
E::MaxCommitteesPerSlot::to_u64() * E::MaxValidatorsPerCommittee::to_u64()
|
||
);
|
||
}
|
||
|
||
#[test]
|
||
fn derived_typenum_values() {
|
||
check_typenum_values::<MinimalEthSpec>();
|
||
check_typenum_values::<MainnetEthSpec>();
|
||
}
|
||
|
||
#[test]
|
||
fn shuffling() {
|
||
ShufflingHandler::<MinimalEthSpec>::default().run();
|
||
ShufflingHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_deposit() {
|
||
OperationsHandler::<MinimalEthSpec, Deposit>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, Deposit>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_exit() {
|
||
OperationsHandler::<MinimalEthSpec, SignedVoluntaryExit>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, SignedVoluntaryExit>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_proposer_slashing() {
|
||
OperationsHandler::<MinimalEthSpec, ProposerSlashing>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, ProposerSlashing>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_attester_slashing() {
|
||
OperationsHandler::<MinimalEthSpec, AttesterSlashing<_>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, AttesterSlashing<_>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_attestation() {
|
||
OperationsHandler::<MinimalEthSpec, Attestation<_>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, Attestation<_>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_block_header() {
|
||
OperationsHandler::<MinimalEthSpec, BeaconBlock<_>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, BeaconBlock<_>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_sync_aggregate() {
|
||
OperationsHandler::<MinimalEthSpec, SyncAggregate<_>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, SyncAggregate<_>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_execution_payload_full() {
|
||
OperationsHandler::<MinimalEthSpec, BeaconBlockBody<_, FullPayload<_>>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, BeaconBlockBody<_, FullPayload<_>>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_execution_payload_blinded() {
|
||
OperationsHandler::<MinimalEthSpec, BeaconBlockBody<_, BlindedPayload<_>>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, BeaconBlockBody<_, BlindedPayload<_>>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_withdrawals() {
|
||
OperationsHandler::<MinimalEthSpec, WithdrawalsPayload<_>>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, WithdrawalsPayload<_>>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_execution_layer_withdrawal_reqeusts() {
|
||
OperationsHandler::<MinimalEthSpec, ExecutionLayerWithdrawalRequest>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, ExecutionLayerWithdrawalRequest>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn operations_deposit_requests() {
|
||
//TODO(electra): re-enable mainnet once they update the name for this
|
||
// OperationsHandler::<MinimalEthSpec, DepositRequest>::default().run();
|
||
// OperationsHandler::<MainnetEthSpec, DepositRequest>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_consolidations() {
|
||
OperationsHandler::<MinimalEthSpec, SignedConsolidation>::default().run();
|
||
//TODO(electra): re-enable mainnet once they make tests for this
|
||
//OperationsHandler::<MainnetEthSpec, SignedConsolidation>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn operations_bls_to_execution_change() {
|
||
OperationsHandler::<MinimalEthSpec, SignedBlsToExecutionChange>::default().run();
|
||
OperationsHandler::<MainnetEthSpec, SignedBlsToExecutionChange>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sanity_blocks() {
|
||
SanityBlocksHandler::<MinimalEthSpec>::default().run();
|
||
SanityBlocksHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sanity_slots() {
|
||
SanitySlotsHandler::<MinimalEthSpec>::default().run();
|
||
SanitySlotsHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn random() {
|
||
RandomHandler::<MinimalEthSpec>::default().run();
|
||
RandomHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_aggregate() {
|
||
BlsAggregateSigsHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_sign() {
|
||
BlsSignMsgHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_verify() {
|
||
BlsVerifyMsgHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_batch_verify() {
|
||
BlsBatchVerifyHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_aggregate_verify() {
|
||
BlsAggregateVerifyHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_fast_aggregate_verify() {
|
||
BlsFastAggregateVerifyHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_eth_aggregate_pubkeys() {
|
||
BlsEthAggregatePubkeysHandler::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(not(feature = "fake_crypto"))]
|
||
fn bls_eth_fast_aggregate_verify() {
|
||
BlsEthFastAggregateVerifyHandler::default().run();
|
||
}
|
||
|
||
/// As for `ssz_static_test_no_run` (below), but also executes the function as a test.
|
||
#[cfg(feature = "fake_crypto")]
|
||
macro_rules! ssz_static_test {
|
||
($($args:tt)*) => {
|
||
ssz_static_test_no_run!(#[test] $($args)*);
|
||
};
|
||
}
|
||
|
||
/// Generate a function to run the SSZ static tests for a type.
|
||
///
|
||
/// Quite complex in order to support an optional #[test] attrib, generics, and the two EthSpecs.
|
||
#[cfg(feature = "fake_crypto")]
|
||
macro_rules! ssz_static_test_no_run {
|
||
// Top-level
|
||
($(#[$test:meta])? $test_name:ident, $typ:ident$(<$generics:tt>)?) => {
|
||
ssz_static_test_no_run!($(#[$test])? $test_name, SszStaticHandler, $typ$(<$generics>)?);
|
||
};
|
||
// Generic
|
||
($(#[$test:meta])? $test_name:ident, $handler:ident, $typ:ident<_>) => {
|
||
ssz_static_test_no_run!(
|
||
$(#[$test])?
|
||
$test_name,
|
||
$handler,
|
||
{
|
||
($typ<MinimalEthSpec>, MinimalEthSpec),
|
||
($typ<MainnetEthSpec>, MainnetEthSpec)
|
||
}
|
||
);
|
||
};
|
||
// Non-generic
|
||
($(#[$test:meta])? $test_name:ident, $handler:ident, $typ:ident) => {
|
||
ssz_static_test_no_run!(
|
||
$(#[$test])?
|
||
$test_name,
|
||
$handler,
|
||
{
|
||
($typ, MinimalEthSpec),
|
||
($typ, MainnetEthSpec)
|
||
}
|
||
);
|
||
};
|
||
// Base case
|
||
($(#[$test:meta])? $test_name:ident, $handler:ident, { $(($($typ:ty),+)),+ }) => {
|
||
$(#[$test])?
|
||
fn $test_name() {
|
||
$(
|
||
$handler::<$($typ),+>::default().run();
|
||
)+
|
||
}
|
||
};
|
||
}
|
||
|
||
#[cfg(feature = "fake_crypto")]
|
||
mod ssz_static {
|
||
use ef_tests::{Handler, SszStaticHandler, SszStaticTHCHandler, SszStaticWithSpecHandler};
|
||
use types::blob_sidecar::BlobIdentifier;
|
||
use types::historical_summary::HistoricalSummary;
|
||
use types::{
|
||
AttesterSlashingBase, AttesterSlashingElectra, Consolidation,
|
||
ExecutionLayerWithdrawalRequest, LightClientBootstrapAltair, PendingBalanceDeposit,
|
||
PendingPartialWithdrawal, *,
|
||
};
|
||
|
||
ssz_static_test!(attestation_data, AttestationData);
|
||
ssz_static_test!(beacon_block, SszStaticWithSpecHandler, BeaconBlock<_>);
|
||
ssz_static_test!(beacon_block_header, BeaconBlockHeader);
|
||
ssz_static_test!(beacon_state, SszStaticTHCHandler, BeaconState<_>);
|
||
ssz_static_test!(checkpoint, Checkpoint);
|
||
ssz_static_test!(deposit, Deposit);
|
||
ssz_static_test!(deposit_data, DepositData);
|
||
ssz_static_test!(deposit_message, DepositMessage);
|
||
// NOTE: Eth1Block intentionally omitted, see: https://github.com/sigp/lighthouse/issues/1835
|
||
ssz_static_test!(eth1_data, Eth1Data);
|
||
ssz_static_test!(fork, Fork);
|
||
ssz_static_test!(fork_data, ForkData);
|
||
ssz_static_test!(historical_batch, HistoricalBatch<_>);
|
||
ssz_static_test!(pending_attestation, PendingAttestation<_>);
|
||
ssz_static_test!(proposer_slashing, ProposerSlashing);
|
||
ssz_static_test!(
|
||
signed_beacon_block,
|
||
SszStaticWithSpecHandler,
|
||
SignedBeaconBlock<_>
|
||
);
|
||
ssz_static_test!(signed_beacon_block_header, SignedBeaconBlockHeader);
|
||
ssz_static_test!(signed_voluntary_exit, SignedVoluntaryExit);
|
||
ssz_static_test!(signing_data, SigningData);
|
||
ssz_static_test!(validator, Validator);
|
||
ssz_static_test!(voluntary_exit, VoluntaryExit);
|
||
|
||
#[test]
|
||
fn attestation() {
|
||
SszStaticHandler::<AttestationBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra().run();
|
||
SszStaticHandler::<AttestationBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra().run();
|
||
SszStaticHandler::<AttestationElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
.run();
|
||
SszStaticHandler::<AttestationElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn attester_slashing() {
|
||
SszStaticHandler::<AttesterSlashingBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<AttesterSlashingBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<AttesterSlashingElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
.run();
|
||
SszStaticHandler::<AttesterSlashingElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn indexed_attestation() {
|
||
SszStaticHandler::<IndexedAttestationBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<IndexedAttestationBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<IndexedAttestationElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
.run();
|
||
SszStaticHandler::<IndexedAttestationElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn signed_aggregate_and_proof() {
|
||
SszStaticHandler::<SignedAggregateAndProofBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<SignedAggregateAndProofBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<SignedAggregateAndProofElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<SignedAggregateAndProofElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn aggregate_and_proof() {
|
||
SszStaticHandler::<AggregateAndProofBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<AggregateAndProofBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra()
|
||
.run();
|
||
SszStaticHandler::<AggregateAndProofElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<AggregateAndProofElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
}
|
||
|
||
// BeaconBlockBody has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn beacon_block_body() {
|
||
SszStaticHandler::<BeaconBlockBodyBase<MinimalEthSpec>, MinimalEthSpec>::base_only().run();
|
||
SszStaticHandler::<BeaconBlockBodyBase<MainnetEthSpec>, MainnetEthSpec>::base_only().run();
|
||
SszStaticHandler::<BeaconBlockBodyAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyBellatrix<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyBellatrix<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
.run();
|
||
SszStaticHandler::<BeaconBlockBodyElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
.run();
|
||
}
|
||
|
||
// Altair and later
|
||
#[test]
|
||
fn contribution_and_proof() {
|
||
SszStaticHandler::<ContributionAndProof<MinimalEthSpec>, MinimalEthSpec>::altair_and_later(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<ContributionAndProof<MainnetEthSpec>, MainnetEthSpec>::altair_and_later(
|
||
)
|
||
.run();
|
||
}
|
||
|
||
// LightClientBootstrap has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn light_client_bootstrap() {
|
||
SszStaticHandler::<LightClientBootstrapAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapAltair<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapAltair<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientBootstrapDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only()
|
||
.run();
|
||
// TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
|
||
// SszStaticHandler::<LightClientBootstrapElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
// .run();
|
||
// SszStaticHandler::<LightClientBootstrapElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
// .run();
|
||
}
|
||
|
||
// LightClientHeader has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn light_client_header() {
|
||
SszStaticHandler::<LightClientHeaderAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderAltair<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderAltair<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only()
|
||
.run();
|
||
|
||
SszStaticHandler::<LightClientHeaderCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
|
||
SszStaticHandler::<LightClientHeaderDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientHeaderElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||
)
|
||
.run();
|
||
}
|
||
|
||
// LightClientOptimisticUpdate has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn light_client_optimistic_update() {
|
||
SszStaticHandler::<LightClientOptimisticUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only().run();
|
||
SszStaticHandler::<LightClientOptimisticUpdateElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only().run();
|
||
}
|
||
|
||
// LightClientFinalityUpdate has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn light_client_finality_update() {
|
||
SszStaticHandler::<LightClientFinalityUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientFinalityUpdateDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only(
|
||
)
|
||
.run();
|
||
// TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
|
||
// SszStaticHandler::<LightClientFinalityUpdateElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||
// )
|
||
// .run();
|
||
// SszStaticHandler::<LightClientFinalityUpdateElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||
// )
|
||
// .run();
|
||
}
|
||
|
||
// LightClientUpdate has no internal indicator of which fork it is for, so we test it separately.
|
||
#[test]
|
||
fn light_client_update() {
|
||
SszStaticHandler::<LightClientUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::altair_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateAltair<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateAltair<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only(
|
||
)
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<LightClientUpdateDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only()
|
||
.run();
|
||
// TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
|
||
// SszStaticHandler::<LightClientUpdateElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||
// )
|
||
// .run();
|
||
// SszStaticHandler::<LightClientUpdateElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||
// )
|
||
// .run();
|
||
}
|
||
|
||
#[test]
|
||
fn signed_contribution_and_proof() {
|
||
SszStaticHandler::<SignedContributionAndProof<MinimalEthSpec>, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SignedContributionAndProof<MainnetEthSpec>, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sync_aggregate() {
|
||
SszStaticHandler::<SyncAggregate<MinimalEthSpec>, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SyncAggregate<MainnetEthSpec>, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sync_committee() {
|
||
SszStaticHandler::<SyncCommittee<MinimalEthSpec>, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SyncCommittee<MainnetEthSpec>, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sync_committee_contribution() {
|
||
SszStaticHandler::<SyncCommitteeContribution<MinimalEthSpec>, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SyncCommitteeContribution<MainnetEthSpec>, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sync_committee_message() {
|
||
SszStaticHandler::<SyncCommitteeMessage, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SyncCommitteeMessage, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn sync_aggregator_selection_data() {
|
||
SszStaticHandler::<SyncAggregatorSelectionData, MinimalEthSpec>::altair_and_later().run();
|
||
SszStaticHandler::<SyncAggregatorSelectionData, MainnetEthSpec>::altair_and_later().run();
|
||
}
|
||
|
||
// Bellatrix and later
|
||
#[test]
|
||
fn execution_payload() {
|
||
SszStaticHandler::<ExecutionPayloadBellatrix<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadBellatrix<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadCapella<MinimalEthSpec>, MinimalEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadCapella<MainnetEthSpec>, MainnetEthSpec>::capella_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadDeneb<MinimalEthSpec>, MinimalEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadDeneb<MainnetEthSpec>, MainnetEthSpec>::deneb_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only()
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn execution_payload_header() {
|
||
SszStaticHandler::<ExecutionPayloadHeaderBellatrix<MinimalEthSpec>, MinimalEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderBellatrix<MainnetEthSpec>, MainnetEthSpec>::bellatrix_only()
|
||
.run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderCapella<MinimalEthSpec>, MinimalEthSpec>
|
||
::capella_only().run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderCapella<MainnetEthSpec>, MainnetEthSpec>
|
||
::capella_only().run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderDeneb<MinimalEthSpec>, MinimalEthSpec>
|
||
::deneb_only().run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderDeneb<MainnetEthSpec>, MainnetEthSpec>
|
||
::deneb_only().run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderElectra<MinimalEthSpec>, MinimalEthSpec>
|
||
::electra_only().run();
|
||
SszStaticHandler::<ExecutionPayloadHeaderElectra<MainnetEthSpec>, MainnetEthSpec>
|
||
::electra_only().run();
|
||
}
|
||
|
||
#[test]
|
||
fn withdrawal() {
|
||
SszStaticHandler::<Withdrawal, MinimalEthSpec>::capella_and_later().run();
|
||
SszStaticHandler::<Withdrawal, MainnetEthSpec>::capella_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn bls_to_execution_change() {
|
||
SszStaticHandler::<BlsToExecutionChange, MinimalEthSpec>::capella_and_later().run();
|
||
SszStaticHandler::<BlsToExecutionChange, MainnetEthSpec>::capella_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn signed_bls_to_execution_change() {
|
||
SszStaticHandler::<SignedBlsToExecutionChange, MinimalEthSpec>::capella_and_later().run();
|
||
SszStaticHandler::<SignedBlsToExecutionChange, MainnetEthSpec>::capella_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn blob_sidecar() {
|
||
SszStaticHandler::<BlobSidecar<MinimalEthSpec>, MinimalEthSpec>::deneb_and_later().run();
|
||
SszStaticHandler::<BlobSidecar<MainnetEthSpec>, MainnetEthSpec>::deneb_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn blob_identifier() {
|
||
SszStaticHandler::<BlobIdentifier, MinimalEthSpec>::deneb_and_later().run();
|
||
SszStaticHandler::<BlobIdentifier, MainnetEthSpec>::deneb_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn historical_summary() {
|
||
SszStaticHandler::<HistoricalSummary, MinimalEthSpec>::capella_and_later().run();
|
||
SszStaticHandler::<HistoricalSummary, MainnetEthSpec>::capella_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn consolidation() {
|
||
SszStaticHandler::<Consolidation, MinimalEthSpec>::electra_and_later().run();
|
||
SszStaticHandler::<Consolidation, MainnetEthSpec>::electra_and_later().run();
|
||
}
|
||
|
||
// TODO(electra) re-enable when EF tests are updated
|
||
// #[test]
|
||
// fn deposit_request() {
|
||
// SszStaticHandler::<DepositRequest, MinimalEthSpec>::electra_and_later().run();
|
||
// SszStaticHandler::<DepositRequest, MainnetEthSpec>::electra_and_later().run();
|
||
// }
|
||
|
||
#[test]
|
||
fn execution_layer_withdrawal_request() {
|
||
SszStaticHandler::<ExecutionLayerWithdrawalRequest, MinimalEthSpec>::electra_and_later()
|
||
.run();
|
||
SszStaticHandler::<ExecutionLayerWithdrawalRequest, MainnetEthSpec>::electra_and_later()
|
||
.run();
|
||
}
|
||
|
||
#[test]
|
||
fn pending_balance_deposit() {
|
||
SszStaticHandler::<PendingBalanceDeposit, MinimalEthSpec>::electra_and_later().run();
|
||
SszStaticHandler::<PendingBalanceDeposit, MainnetEthSpec>::electra_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn pending_consolidation() {
|
||
SszStaticHandler::<PendingConsolidation, MinimalEthSpec>::electra_and_later().run();
|
||
SszStaticHandler::<PendingConsolidation, MainnetEthSpec>::electra_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn pending_partial_withdrawal() {
|
||
SszStaticHandler::<PendingPartialWithdrawal, MinimalEthSpec>::electra_and_later().run();
|
||
SszStaticHandler::<PendingPartialWithdrawal, MainnetEthSpec>::electra_and_later().run();
|
||
}
|
||
|
||
#[test]
|
||
fn signed_consolidation() {
|
||
SszStaticHandler::<SignedConsolidation, MinimalEthSpec>::electra_and_later().run();
|
||
SszStaticHandler::<SignedConsolidation, MainnetEthSpec>::electra_and_later().run();
|
||
}
|
||
}
|
||
|
||
#[test]
|
||
fn ssz_generic() {
|
||
SszGenericHandler::<BasicVector>::default().run();
|
||
SszGenericHandler::<Bitlist>::default().run();
|
||
SszGenericHandler::<Bitvector>::default().run();
|
||
SszGenericHandler::<Boolean>::default().run();
|
||
SszGenericHandler::<Uints>::default().run();
|
||
SszGenericHandler::<Containers>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_justification_and_finalization() {
|
||
EpochProcessingHandler::<MinimalEthSpec, JustificationAndFinalization>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, JustificationAndFinalization>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_rewards_and_penalties() {
|
||
EpochProcessingHandler::<MinimalEthSpec, RewardsAndPenalties>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, RewardsAndPenalties>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_registry_updates() {
|
||
EpochProcessingHandler::<MinimalEthSpec, RegistryUpdates>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, RegistryUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_slashings() {
|
||
EpochProcessingHandler::<MinimalEthSpec, Slashings>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, Slashings>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_eth1_data_reset() {
|
||
EpochProcessingHandler::<MinimalEthSpec, Eth1DataReset>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, Eth1DataReset>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_pending_balance_deposits() {
|
||
EpochProcessingHandler::<MinimalEthSpec, PendingBalanceDeposits>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, PendingBalanceDeposits>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_pending_consolidations() {
|
||
EpochProcessingHandler::<MinimalEthSpec, PendingConsolidations>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, PendingConsolidations>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_effective_balance_updates() {
|
||
EpochProcessingHandler::<MinimalEthSpec, EffectiveBalanceUpdates>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, EffectiveBalanceUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_slashings_reset() {
|
||
EpochProcessingHandler::<MinimalEthSpec, SlashingsReset>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, SlashingsReset>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_randao_mixes_reset() {
|
||
EpochProcessingHandler::<MinimalEthSpec, RandaoMixesReset>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, RandaoMixesReset>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_historical_roots_update() {
|
||
EpochProcessingHandler::<MinimalEthSpec, HistoricalRootsUpdate>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, HistoricalRootsUpdate>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_historical_summaries_update() {
|
||
EpochProcessingHandler::<MinimalEthSpec, HistoricalSummariesUpdate>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, HistoricalSummariesUpdate>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_participation_record_updates() {
|
||
EpochProcessingHandler::<MinimalEthSpec, ParticipationRecordUpdates>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, ParticipationRecordUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_sync_committee_updates() {
|
||
// There are presently no mainnet tests, see:
|
||
// https://github.com/ethereum/consensus-spec-tests/issues/29
|
||
EpochProcessingHandler::<MinimalEthSpec, SyncCommitteeUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_inactivity_updates() {
|
||
EpochProcessingHandler::<MinimalEthSpec, InactivityUpdates>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, InactivityUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn epoch_processing_participation_flag_updates() {
|
||
EpochProcessingHandler::<MinimalEthSpec, ParticipationFlagUpdates>::default().run();
|
||
EpochProcessingHandler::<MainnetEthSpec, ParticipationFlagUpdates>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_upgrade() {
|
||
ForkHandler::<MinimalEthSpec>::default().run();
|
||
ForkHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn transition() {
|
||
TransitionHandler::<MinimalEthSpec>::default().run();
|
||
TransitionHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn finality() {
|
||
FinalityHandler::<MinimalEthSpec>::default().run();
|
||
FinalityHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_get_head() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("get_head").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("get_head").run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_on_block() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("on_block").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("on_block").run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_on_merge_block() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("on_merge_block").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("on_merge_block").run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_ex_ante() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("ex_ante").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("ex_ante").run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_reorg() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("reorg").run();
|
||
// There is no mainnet variant for this test.
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_withholding() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("withholding").run();
|
||
// There is no mainnet variant for this test.
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_should_override_forkchoice_update() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("should_override_forkchoice_update").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("should_override_forkchoice_update").run();
|
||
}
|
||
|
||
#[test]
|
||
fn fork_choice_get_proposer_head() {
|
||
ForkChoiceHandler::<MinimalEthSpec>::new("get_proposer_head").run();
|
||
ForkChoiceHandler::<MainnetEthSpec>::new("get_proposer_head").run();
|
||
}
|
||
|
||
#[test]
|
||
fn optimistic_sync() {
|
||
OptimisticSyncHandler::<MinimalEthSpec>::default().run();
|
||
OptimisticSyncHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn genesis_initialization() {
|
||
GenesisInitializationHandler::<MinimalEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn genesis_validity() {
|
||
GenesisValidityHandler::<MinimalEthSpec>::default().run();
|
||
// Note: there are no genesis validity tests for mainnet
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_blob_to_kzg_commitment() {
|
||
KZGBlobToKZGCommitmentHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_compute_blob_kzg_proof() {
|
||
KZGComputeBlobKZGProofHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_compute_kzg_proof() {
|
||
KZGComputeKZGProofHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_verify_blob_kzg_proof() {
|
||
KZGVerifyBlobKZGProofHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_verify_blob_kzg_proof_batch() {
|
||
KZGVerifyBlobKZGProofBatchHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn kzg_verify_kzg_proof() {
|
||
KZGVerifyKZGProofHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn merkle_proof_validity() {
|
||
MerkleProofValidityHandler::<MainnetEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
#[cfg(feature = "fake_crypto")]
|
||
fn kzg_inclusion_merkle_proof_validity() {
|
||
KzgInclusionMerkleProofValidityHandler::<MainnetEthSpec>::default().run();
|
||
KzgInclusionMerkleProofValidityHandler::<MinimalEthSpec>::default().run();
|
||
}
|
||
|
||
#[test]
|
||
fn rewards() {
|
||
for handler in &["basic", "leak", "random"] {
|
||
RewardsHandler::<MinimalEthSpec>::new(handler).run();
|
||
RewardsHandler::<MainnetEthSpec>::new(handler).run();
|
||
}
|
||
}
|